We are playing a guessing game. The rules of the game are as follows:
A number from n is chosen.
You attempt to guess the chosen number.
If you guess correctly, you win the game.
If your guess is incorrect, you are told whether the chosen number is higher or lower than your guess, and you continue guessing.
Each time you make an incorrect guess of value
Given an integer n, return the minimum amount of money required to guarantee a win regardless of which number is chosen.
Constraints:
n
We are playing a guessing game. The rules of the game are as follows:
A number from n is chosen.
You attempt to guess the chosen number.
If you guess correctly, you win the game.
If your guess is incorrect, you are told whether the chosen number is higher or lower than your guess, and you continue guessing.
Each time you make an incorrect guess of value
Given an integer n, return the minimum amount of money required to guarantee a win regardless of which number is chosen.
Constraints:
n