Doubling After a Loss with $31 Bankroll

Start with a $31 bankroll and bet $1 on a fair coin at even odds. Double the bet after each loss. Stop on the first win or when the bankroll is exhausted. What is the expected profit?

Input: none. Ou...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: