Game of numbers
CodeChefOpen on judge ↗
Alice and Bob love playing games, and this time they are playing with an array of $N$ integers. They take turns alternatively, with Alice having the first turn. In a player's turn, the player can pick any number (say $x$) which is greater than 1 from the array. Then the player transforms the number $x$ into $(x \times i) / p$, where $p$ is any prime number which divides $x$ and $i$ is an integer i
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start