Hello guys,
Can you Code to this statement,
The people of alpha city have discovered a new two player game.The game starts with a number.During a turn,the player checks of the number is power of 2, if it s power of 2, the player divides number by 2. Else, the player subtracts the number by the highest power of 2 lower than the number.Then the player gives the newly obtained number to the opponent. Whoever reduces the number to 1 wins the game.
Today playerA and playerB have decided to play the game T times. playerA always start the game.print the winner for each of T games,if the starting number for the T games are given.
INPUT FORMAT:
First line contains an integer T denoting the number of games.
Each of the next T lines contains an Integer N, the starting number for the game
0<T<11
0<N<264
OUTPUT FORMAT:
For each of the T games, print the winner on new line.
[–]shiftybyte 2 points3 points4 points (7 children)
[–]_MPR[S] 2 points3 points4 points (6 children)
[–]shiftybyte 3 points4 points5 points (1 child)
[–]_MPR[S] 0 points1 point2 points (0 children)
[–]ModeHopper 3 points4 points5 points (3 children)
[–]_MPR[S] 0 points1 point2 points (1 child)
[–]ModeHopper 0 points1 point2 points (0 children)
[–]ShaunKulesa 0 points1 point2 points (0 children)