The problem What are the odds? is a very easy problem actually as long as you have basic knowledge about Nim Game. Sadly, it still took me about half an hour to get accepted due to a little mistake caused by careless reading and comprehension. I just thought about it as what I thought about regardless of the problem discription, and this is what I am good at. :(

The time complexity can be $O(n)$, but all is ok.