TORONTO KIDS COMPUTER CLUB | Aurora Wednesday 18:30 Python Practice 22.05.11.
20641
post-template-default,single,single-post,postid-20641,single-format-standard,ajax_fade,page_not_loaded,,no_animation_on_touch,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

# Aurora Wednesday 18:30 Python Practice 22.05.11.

## 13 May Aurora Wednesday 18:30 Python Practice 22.05.11.

Question:
Jack is depositing money! Every year, Jack puts N coins into his bank account. At the end of each year, Jack’s investments will grow by P percent, rounded down to the nearest coin. After Y years, he would like to have at least T coins in his bank account so that he can buy some presents for a special someone. Since Jack is an efficient individual, he would like to know the minimum number of coins he has to put into his bank account every year so that he will have T coins by the end of Y years. Can you help him find this value?

Input Specification
The first and only line will contain 3 space separated integers PY, and T.

Output Specification
The output should contain a single integer, the minimum number of coins N that Jack should put into his bank account per year.

```Sample Input 1
50 3 200

Sample Output 1
29

Explanation for Sample Output 1
Initially, Jack's bank account is empty.
In the first year, Jack deposits 29 coins into the bank, which at the end of the year turns into 43 coins (rounding down).
In the second year he again deposits 29 coins, reaching a total of 72 coins. At the end of the year, the interest boosts this up to 108 coins.
In the third year, The balance is 137 coins after Jack's deposit, increasing to 205 coins after interest.```

```Sample Input 2
100 2 300

Sample Output 2
50

Explanation for Sample Output 2
Here is Jack's bank balance over the course of 2 years:
Year 1: +50 50→100
Year 2: +50 150→300```

```Sample Input 3
80 2 4

Sample Output 3
2

Explanation for Sample Output 3
Due to the interest being rounded down to the nearest coin, only depositing 1 coin per year would not be enough.```

```Sample Input 4
11 63524 9182748294

Sample Output 4
1```
##### No Comments

Sorry, the comment form is closed at this time.