4. Andraž and Breda cut two long strips of lengths $a$ and $b$ from a magazine to play with. In this game, the player whose turn it is cuts a piece of length $d$ from any strip. The player who first cannot cut a piece of length $d$ loses the game. Andraž, being a gentleman, lets Breda start the game. Determine how the lengths of the strips affect who will win.

Solve the problems independently. Time allowed: $3 \frac{1}{2}$ hours.

The use of notes, literature, or a pocket calculator is not permitted.

45th Mathematical Competition for High School Students in Slovenia

Idrija, May 12, 2001

## PROBLEMS FOR THE SECOND YEAR
I/4. From a strip of length $a$, we can sequentially cut $\left[\frac{a}{d}\right]$ pieces of length $d$, and from a strip of length $b$, we can cut $\left[\frac{b}{d}\right]$ pieces of length $d$. Therefore, the game will end after $n=\left[\frac{a}{d}\right]+\left[\frac{b}{d}\right]$ moves. Since Breda starts the game, she makes the odd cuts, and Andraž makes the even cuts. Thus, if the number $n$ is odd, Breda will win by making the last cut, but if the number of cuts is even, Andraž will win.

Note. By $[x]$ we denote the greatest integer that does not exceed the real number $x$; for example, $[\pi]=3$, $[-\pi]=-4$.