if a[i] is 1 then its contribution will be zero right ?
because 1 modulo 1 is 0
1
5 2
1 1 1 1 1
Should be 0
Not 5%2
if a[i] is 1 then its contribution will be zero right ?
because 1 modulo 1 is 0
1
5 2
1 1 1 1 1
Should be 0
Not 5%2
Same here
hell yes… i forgot 
Awwwwwwww 




They have weak test cases 
Why? Your logic have AC?
yesss
print(n%m) 
Damn… weak af… Can you please help me in this too… please please please
I divide the n/m and then checked whether it’s divisible by 2 or not. It passed half of the test cases… where must I have gone wrong?
Not weak, Wrong test cases LOL.
They also forgot it.
Test Case #3 fails with my soln




bhai bhai
whats your solution ?
number of 1’s=k and then (n-k)%m
Local contest requires local solution
XD
check n%(m+1).
if 0 then no;
else yes;
Yes. This gave AC. Can you please explain? Thanks
Can you explain?
Yes , Its simple.
Whoever remains with m+1 tiles will loose surely because he can’t pick all the tiles and must pick at least one tile and hence the opponent can pick all the remaining tiles.
Therefore optimal game play is to play such that the other player is left with m+1 tiles.