package
0.0.0-20241125083417-0b09d6ac830b
Repository: https://github.com/yydaily/project-euler-solution.git
Documentation: pkg.go.dev

# README

A and B play a game. A has originally $1$ gram of gold and B has an unlimited amount. Each round goes as follows:

  • A chooses and displays, $x$, a nonnegative real number no larger than the amount of gold that A has.
  • Either B chooses to TAKE. Then A gives B $x$ grams of gold.
  • Or B chooses to GIVE. Then B gives A $x$ grams of gold.

B TAKEs $n$ times and GIVEs $n$ times after which the game finishes.

Define $g(X)$ to be the smallest value of $n$ so that A can guarantee to have at least $X$ grams of gold at the end of the game. You are given $g(1.7)=10$.

Find $g(1.9999)$.