: Stone Pit is a game in historic roman time, that involves removing stones from tower of stones. The rules of this game are mentioned
: Stone Pit is a game in historic roman time, that involves removing stones from tower of stones. The
rules of this game are mentioned under:
• At first there are X group of stones, numbered 1 through X.
Two warriors can play and they take alternate turns. If the bitwise XOR of all group equals 0
before a warrior’s chance, then that warrior is declared winner.
When warrior’s turn comes, they must choose one of the remaining groups and remove it.
Develop a JAVA program to decide which warrior wins, given that both warriors are expert at this
game.
Sample Input:
1
3
561
Sample Output:
First Warrior

How it Works

1
It only takes a couple of minutes to fill in your details, select the type of paper you need (essay, term paper, etc.), give us all necessary information regarding your assignment.


2
Once we receive your request, one of our customer support representatives will contact you within 24 hours with more specific information about how much it'll cost for this particular project.


3
After receiving payment confirmation via PayPal or credit card – we begin working on your detailed outline, which is based on the requirements given by yourself upon ordering.


4
Once approved, your order is complete and will be emailed directly to the email address provided before payment was made!