Under construction

Still being built. Things may change

Paying Off the Debt

Interview

Time limit2sMemory limit128 MB

Summary
Simulate monthly interest rounded to the cent with a fixed payment to count months until the debt clears or report impossible.
Level

Easy3 of 10

Topics
Simulation
Solved
No attempts yet

Problem

Sangkeun borrowed B dollars from Sunyoung. Now it is time to pay her back.

At the start of every month, interest equal to R percent of what Sangkeun still owes is added to the debt. At the end of every month he earns M dollars from tutoring and pays that much to Sunyoung.

Sangkeun borrows no more money from Sunyoung, he works no job other than tutoring, and his tutoring pay never rises.

Write a program that finds how many months it takes him to pay the debt off.

Interest is rounded to the nearest cent. One dollar is 100 cents, a leftover of 0.5 cent or more rounds up to 1 cent, and anything smaller is dropped.

Input

The input holds several test cases. The first line gives the number of test cases, which is at most 1000.

Each test case is one line with R, B and M separated by spaces. All three are real numbers written with two digits after the decimal point, and R≤50.00R \le 50.00, B,M≤50000.00B, M \le 50000.00.

Output

For each test case, print on its own line how many months it takes to pay the debt off. If the debt cannot be cleared within 1200 months, print impossible.

Examples1

  1. Example 1

    Input
    11
    2.00 100.00 105.00
    2.00 100.00 102.00
    2.00 100.00 100.00
    2.00 100.00 4.00
    2.00 100.00 3.00
    2.00 100.00 1.00
    2.00 100.00 2.00
    9.56 5462.50 522.22
    12.50 29876.44 33610.99
    5.50 1.00 1.05
    14.78 40181.09 46119.86
    
    Expected output
    1
    1
    2
    36
    56
    impossible
    impossible
    impossible
    2
    2
    1