Rick, Morty and Dice Game
CodeChefOpen on judge ↗
Rick and Morty wanted to start the day by playing a game. Both of them have their own polyhedral dice. Rick’s dice has $n_1$ faces with numbers 1 to $n_1$ while Morty’s dice has $n_2$ faces with numbers 1 to $n_2$. In the $k_{th}$ round of the game: - Rick wins, if his dice shows an even number when $k$ is odd or shows an odd number when $k$ is even. - Morty wins, if his dice shows an odd number
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