Блог пользователя a2dalek

Автор a2dalek, история, 3 года назад, По-английски

I can't solve this problem: There are N stones (N<=1e18) and two players. They play alterably. At the k-th turn, player must take at least 1 stone but can take no more than k stones (player at the first turn can take no more than 1, player at the second turn can take no more than 2,..). Who takes the last stone is the winner. Give N, who will win the game, player 1 or player 2 ? Please help me. Tks.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -15
  • Проголосовать: не нравится