← All problemsSign in

GAME OF NUMBERS

$Bob$ likes to play games very much. Today, $Bob$ is playing a game in which a number $A$ will be given and $Bob$ has to guess if $A$ will be even or odd before seeing the value of $A$. - If he correctly guesses it then he wins $B$ coins. - Else He will lose $B$ coins. Initially, he has $C$ coins. Since $Bob$ thinks of even numbers as lucky numbers, He will always guess $A$ as an even number. Yo

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