Hi, I do not have enough karma points to ask a separate question(sorry for posting the question here. But I badly want to solve this problem). Can someone please help me to decipher this question. I do not understand the sample output given.
Micro’s math teacher just taught him about Modular Arithmetic, and gave him an assignment to solve. Assignment is really large and will take a lot of his time. Micro wants to go out and play as soon as possible. The assignment consists of some decimal numbers and Micro has to find out the value of their modulo 10^9+7.
First line consists of T denoting the number of test cases. Each of the following T lines consists of a decimal number.
For each test case print the value of decimal number modulo 10^9, and if modulo does not exists print -1. Print a new line after each test case.
1≤Total number of digits in the number≤18
1≤Number of digits after decimal point≤9