当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6646:A + B = C

Special Judge 特殊评判
题目描述
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$.
输入解释
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}$).
输出解释
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.
输入样例
3
23 39 62
2 31 51
1 1 1
输出样例
0 0 0
1 0 0
-1

提示
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".
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6646

最后修改于 2020-10-25T23:33:07+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 524288/524288K(Java/Others)