Daily

Random

Practice set

Baltic Way 2022 · Problem 20

Number Theory

Ingrid and Erik are playing a game. For a given odd prime pp, the numbers 1,2,3,…,p−11,2,3,\ldots,p-1 are written on a blackboard. The players take turns making moves with Ingrid starting. A move consists of one of the players crossing out a number on the board that has not yet been crossed out. If the product of all currently crossed out numbers is 1(modp)1\pmod p after the move, the player whose move it was receives one point, otherwise zero points are awarded. The game ends after all numbers have been crossed out.

The player who has received the most points by the end of the game wins. If both players have the same score, the game ends in a draw. For each pp, determine which player (if any) has a winning strategy.

Change pool

When you’re ready

Review material becomes available with the next Daily.

Review

Topics

Primes · Modular arithmetic

Solutions

No verified local solution is currently available.

Contest context

Results from Baltic Way 2022

10 teams

Mean score
3.0 / 5
Scores of 4 or 5
5 / 10
Estonia
5 / 5

Score distribution

00
14
20
31
42
53
All team scores
TeamScore
Poland3 / 5
Germany4 / 5
Lithuania1 / 5
Estonia5 / 5
Denmark5 / 5
Latvia5 / 5
Sweden1 / 5
Norway1 / 5
Finland4 / 5
Iceland1 / 5