Skip to main content
OlympiadHQ

Browse · MathNet

Print

59th Ukrainian National Mathematical Olympiad

Ukraine counting and probability

Problem

The number is written on the board. Katia and Mykola are playing the following game: one by one (starting with Katia) they choose any divisor of the number written on the board and change the number on the board to the number , if it is positive integer. Whoever writes number loses. Who will win in this game and what is the strategy, considering both players want to win?
Solution
Firstly, we will show that the number on the board decreases with every turn. Clearly, it will be smaller and integer. It will be positive, since: , since if then . Therefore, number will be written on the board after finite number of turns.

It isn't hard to notice, that every turn changes the parity of the number on the board. Since Katia starts the game, there will be even number after her turn, and odd number after Mykola's turn. Therefore, number will be written on the board after Mykola's turn, so he will lose.
Final answer
Katia wins; because the number decreases and parity alternates each turn, the number one is written on Mykola’s turn, so he loses. Katia can simply make any legal move each turn.

Techniques

Invariants / monovariantsGames / greedy algorithmsDivisibility / Factorization