<filename>code/billionaire/sol_267.py<gh_stars>1-10

# -*- coding: utf-8 -*-
'''
    File name: code\billionaire\sol_267.py
    Author: <NAME>
    Date created: Oct 20, 2018
    Python Version: 3.x
'''

# Solution to Project Euler Problem #267 :: Billionaire
# 
# For more information see:
# https://projecteuler.net/problem=267

# Problem Statement 
'''
You are given a unique investment opportunity.
Starting with £1 of capital, you can choose a fixed proportion, f, of your capital to bet on a fair coin toss repeatedly for 1000 tosses.
Your return is double your bet for heads and you lose your bet for tails.
For example, if f = 1/4,  for the first toss you bet £0.25, and if heads comes up you win £0.5 and so then have £1.5. You then bet £0.375 and if the second toss is tails, you have £1.125.
Choosing f to maximize your chances of having at least £1,000,000,000 after 1,000 flips, what is the chance that you become a billionaire?
All computations are assumed to be exact (no rounding), but give your answer rounded to 12 digits behind the decimal point in the form 0.abcdefghijkl.
'''

# Solution 

# Solution Approach 
'''
'''

<filename>code/billionaire/sol_267.py<gh_stars>1-10

# -*- coding: utf-8 -*-
'''
    File name: code\billionaire\sol_267.py
    Author: <NAME>
    Date created: Oct 20, 2018
    Python Version: 3.x
'''

# Solution to Project Euler Problem #267 :: Billionaire
# 
# For more information see:
# https://projecteuler.net/problem=267

# Problem Statement 
'''
You are given a unique investment opportunity.
Starting with £1 of capital, you can choose a fixed proportion, f, of your capital to bet on a fair coin toss repeatedly for 1000 tosses.
Your return is double your bet for heads and you lose your bet for tails.
For example, if f = 1/4,  for the first toss you bet £0.25, and if heads comes up you win £0.5 and so then have £1.5. You then bet £0.375 and if the second toss is tails, you have £1.125.
Choosing f to maximize your chances of having at least £1,000,000,000 after 1,000 flips, what is the chance that you become a billionaire?
All computations are assumed to be exact (no rounding), but give your answer rounded to 12 digits behind the decimal point in the form 0.abcdefghijkl.
'''

# Solution 

# Solution Approach 
'''
'''

# -*- coding: utf-8 -*- File name: code\billionaire\sol_267.py     Author: <NAME>     Date created: Oct 20, 2018     Python Version: 3.x # Solution to Project Euler Problem #267 :: Billionaire # # For more information see: # https://projecteuler.net/problem=267 # Problem Statement You are given a unique investment opportunity. Starting with £1 of capital, you can choose a fixed proportion, f, of your capital to bet on a fair coin toss repeatedly for 1000 tosses. Your return is double your bet for heads and you lose your bet for tails. For example, if f = 1/4,  for the first toss you bet £0.25, and if heads comes up you win £0.5 and so then have £1.5. You then bet £0.375 and if the second toss is tails, you have £1.125. Choosing f to maximize your chances of having at least £1,000,000,000 after 1,000 flips, what is the chance that you become a billionaire? All computations are assumed to be exact (no rounding), but give your answer rounded to 12 digits behind the decimal point in the form 0.abcdefghijkl. # Solution # Solution Approach