Doracake Game
CodeChefOpen on judge ↗
Doraemon challenge Nobita. Doraemon and Nobita decide to play a game called Doracake game.The Rules of the game are: Initially Doraemon has N Doracakes. In each turn a player eats one doracake .They optimally eat doracakes(for example: if doraemon eats the one doracake then nobita eats then doraemon so on). The game will stop when the left number of doracakes are a prime number or all doracake
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