← All problemsSign in

Dollar Game

So, you are bored and you think about playing a game. The game is like, if you win your money will be doubled and eleven dollars extra will be added to it. If you lose, your money will be halved (if the amount is odd, it will be halved to the upper integer). The inital amount of money you have is 'X'. A sequence of W and L are given as input, and 'X' is given initially. You have to find the amo

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