Savings
InterviewTime limit1sMemory limit128 MB
For each test case, print how many years of multiplying the balance by (1 + B/100) are needed until it first exceeds M.
- Level
Easy2 of 10
- Topics
- Simulation, Math, Implementation, Brute force
- Solved
- No attempts yet
Problem
Sanggeun opened a new bank account and deposited won. After that, he never deposits into or withdraws from this account.
Every time one full year passes since the account was opened, the bank adds interest equal to of the balance currently in the account. In other words, the balance is multiplied by each year.
Sanggeun wonders after how many years the balance will first exceed won.
Given , , and , write a program that determines how many years must pass for the balance to exceed won.
Input
The input consists of several test cases. Each test case is a single line containing three real numbers , , and , separated by spaces. is always greater than .
and are greater than and at most . is greater than and at most . Every number may be given with up to two decimal places.
The input continues until end of file (EOF).
Output
For each test case, print on its own line the number of years that must pass for the balance to exceed won.