Problem

Source: Latvia TST for Baltic Way 2020 P5

Tags: combinatorics



Natural numbers $1,2,...,500$ are written on a blackboard. Two players $A$ and $B$ consecutively make moves, $A$ starts. Each move a player chooses two numbers $n$ and $2n$ and erases them from the blackboard. If a player cannot perform a valid move, he loses. Which player can guarantee a win?