Evenius can only remove an even number of stones on his turn, but not more than…
- User
Evenius can only remove an even number of stones on his turn, but not more than
(flor(n/2)) stones. Oddius can only remove an odd number of stones on his turn, but not more than (flor(n/2))
stones. Note that, here N represents the initial number of stones and denotes the floor function.
Both masters are strategists and will always play optimally to ensure their victory. Your task is to predict the outcome of this legendary battle and determine who will emerge victorious.
The input consists of multiple lines. The first line contains an integer representing the number of test cases. Each of the next lines contains two integers: n,p denoting the initial number of stones in the pile and representing the starting player, represents Oddius =1and represents Evenius =2.
This is logical problem please help me
- Assistant