PROJECT EULER · #0852
Coins in a Box
This game has a box of
The player begins with a score of 0 which may become negative during play.
At each round the player randomly picks a coin from the box and guesses its type: fair or unfair. Before guessing they may toss the coin any number of times; however, each toss subtracts 1 from their score. The decision to stop tossing and make a guess can be made at any time. After guessing the player's score is increased by 20 if they are right and decreased by 50 if they are wrong. Then the coin type is revealed to the player and the coin is discarded.
After
You are given
Find
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.