All Can Do
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 32768/32768 K (Java/Others)
Construct a number N follows three below restrictions:
1. T-1 <= Log10N < T, ( 0 < T <= 100 )
2. 90 mod b = 0
3. N mod b = 0
Please help me find the biggest N.
The first line contains an integer t means the number of test cases.
Then each line will contain two integers T and b.
For each case, output N in one line, if there is no such answer, output "Impossible!".
HDU 2009-11 Programming Contest