MathDB
Game of stones

Source: Kyiv City MO 2022 Round 2, Problem 7.4

January 30, 2022
combinatoricsgameGCD

Problem Statement

Fedir and Mykhailo have three piles of stones: the first contains 100100 stones, the second 101101, the third 102102. They are playing a game, going in turns, Fedir makes the first move. In one move player can select any two piles of stones, let's say they have aa and bb stones left correspondently, and remove gcd(a,b)gcd(a, b) stones from each of them. The player after whose move some pile becomes empty for the first time wins. Who has a winning strategy?
As a reminder, gcd(a,b)gcd(a, b) denotes the greatest common divisor of a,ba, b.
(Proposed by Oleksii Masalitin)