12985. Sum Fun
限制条件
时间限制: 1 秒, 内存限制: 256 兆
题目描述
Given a list of 3 positive integers, it may or may not be true that one of those numbers is the sum of the other two. Given several such sets of 3 positive integers, either output the equation that shows that one number can be written as the sum of the other
two, or indicate that there is no sum.
输入格式
The input begins with an integer T (T<=10), indicating the number of test cases. The following T lines each contain exactly 3 space-separated positive integers. Each integer is less than or equal to 100.
输出格式
If one of the numbers can be written as the sum of the other two, then write the equation as shown below (the two that can be added to make the third should be output in the same order that they appeared in the input). Note that a space separates each number
from each symbol in the equation. If no such sum can be made, output the three numbers in their original order, followed by a space, followed by the words NO SUM. Format your output as shown below.
样例输入
3 4 12 8 3 2 1 6 12 5
样例输出
4 + 8 = 12 2 + 1 = 3 6 12 5 NO SUM
提示
提示:请注意输出式子中的空格.
题目来源
2014年每周一赛第十五场暨“指点传媒杯”第六届中山大学ICPC新手赛模拟赛