spoj#MONEYYTU. Save money for YTU
Save money for YTU
It is Taru’s dream to study in Yanyang Technological University and Taru must start saving money in order to ensure that he has sufficient funds to take admission. Taru needs to have X amount of dollars at the end of T months. Taru deposits his money in a bank that pays a monthly interest of R% on the balance in his account. But wait, Taru is very superstitious; he deposits money in his account only if the balance in the account is a multiple of 100. If the balance in the account at the beginning of a month is not a multiple of 100 Taru withdraws the minimum offset to make the balance divisible by 100 and donates it to a charitable trust. Example – If in the beginning of the month Taru has $17823 in his account he will donate $23 and make the balance divisible by 100. You are to calculate the minimum monthly installment which Taru should deposit in the bank in order to get the funds required.
Input
The first line contains the number of test cases (Test) followed by Test lines each containing 3 integers, X, T, R.
Output
For each test case output the minimum monthly installment Taru deposits in the bank in order to generate the required funds. Print the answer rounded to 4 decimal places.
Constraints Test<=20, X<=10^6, T<=60, R<=10.
Sample Input
2
50000 3 5
20000 5 6
Sample Output
15142.8571
3386.7925