← All problemsSign in

Sonic And Game

Sonic, Kohli and Anonymous are playing a game. They have a transparent bag of R red balls, B blue balls and G green balls. In each turn a player removes a ball of his desired color. Sonic has no particular affinity for any color so he chooses any random ball of his choice. Kohli dislikes green color so he never chooses a green ball. Anonymous likes only green color so he picks only green ball. Son

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