← All problemsSign in

Rishi is Winner

Rishi and Amit are thinking of developing a new game. In which two persons will play and they will be provided a heap of cards of given length. Each of those two persons will take turns to draw 1 to 3 cards. Rishi will first start to remove the cards. Whoever draws the last card will be the winner. Yash wants to predict the result of game and he wants Rishi to win it. Develop a program to determin

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