Problem

Source: 2023 Israel National Olympiad P7

Tags: number theory, Digits, guessing game



Ana and Banana are playing a game. Initially, Ana secretly picks a number $1\leq A\leq 10^6$. In each subsequent turn of the game, Banana may pick a positive integer $B$, and Ana will reveal to him the most common digit in the product $A\cdot B$ (written in decimal notation). In the case when at least two digits are tied for being the most common, Ana will reveal all of them to Banana. For example, if $A\cdot B=2022$, Ana will tell Banana that the digit $2$ is the most common, while if $A\cdot B=5783783$, Ana will reveal that $3, 7$ and $8$ are the most common. Banana's goal is to determine with certainty the number $A$ after some number of turns. Does he have a winning strategy?