You are viewing a single comment's thread. Return to all comments →
bin(int(input())-1) bin converts the input to binary representation then you are converting it to string and counting the no of 1's in that string
since Louise and Richard playing the game on alternate turn so if the no of 1's are even then Richard wins otherwise Louise wins
Counter game
You are viewing a single comment's thread. Return to all comments →
bin(int(input())-1) bin converts the input to binary representation then you are converting it to string and counting the no of 1's in that string
since Louise and Richard playing the game on alternate turn so if the no of 1's are even then Richard wins otherwise Louise wins