← All problemsSign in

Nim Game with Arpit Gupta

Manasa loves the nim game, in which there are n buckets, each having Ai balls. Two players play alternately. Each turn consists of removing some non-zero number of balls from one of the buckets. A player with a lack of moves loses. But, Manasa having played it so many times, she gets bored one day. So she wants to change the rules of the game. She loves prime numbers, so she makes a new rule: any

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start