Count Turns (countturns)

28 teams scored 2295 points on this task, for a maximum score of 100, an average score of 82 and a median score of 100.

Highlights

  1. Carducci - Volta - Pacinotti, Piombino is the institute with the most points (200).
  2. Lombardia is the region with the most points (500).

Statement

Alice and Bob are playing the following game: There are N stones in a pile, and a positive integer K. They take turns with Alice going first. In one turn, the player can take at least one and at most K stones from the pile. The game ends when there are no more stones left. Alice wins, if the total number of turns until this point is divisible by K, Bob wins otherwise. Given N and K, determine who has a winning strategy.