uva10165专题

UVA10165 Stone Game【Nim游戏】

Jack and Jim are playing an interesting stone game. At the beginning of the game there are N pile(s) of stones. Each pile has Pi (i = 1..N, 1 ≤ Pi ≤ 2 ∗ 10^9) stones. They take turns to take away some