|
||||||||||
A + B = CTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 2576 Accepted Submission(s): 602 Special Judge Problem Description Hi everyone! Welcome to the Stage 7 of this series of training contests. Cuber QQ is the problem settler of this contest; he has prepared 11 problems for you and wishes you to enjoy it. Good luck! As the first problem of this contest, Cuber QQ thought that it's reasonable to start with an easy one, so he modified the famous A + B problem by a little bit, so that it's easy enough but not that trivial. Given $a, b, c$ , find an arbitrary set of $x, y, z$ such that $a\cdot 10^x+b\cdot 10^y=c\cdot 10^z$ and $0 \le x, y, z \le 10^6$. Input The input consists of multiple test cases, starting with an integer $t$ ($1 \le t \le 100$), denoting the number of test cases. For each test case, there are three space-separated integers, $a, b, c$ respectively ($1 \le a, b, c \le 10^{100000}$). Output For each test case, please output three space-separated integers $x, y, z$. If there are multiple solutions, print any of them. In case there are no solutions, please output $-1$ as a single line. Sample Input
Sample Output
Hint HDOJ may give ambiguous feedback due to the compatibility issue of our checker. If you see "System Error", please think of it as "Wrong Answer". Source | ||||||||||
|