Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).
Input Specification:
Each input file contains one test case. Each case contains a pair of integers a and b where $$-10^{6} \leq a, b \leq 10^{6} $$
. The numbers are separated by a space.
Output Specification:
For each test case, you should output the sum of a and b in one line. The sum must be written in the standard format.
Sample Input:
-1000000 9
Sample Output:
-999,991
题目翻译:
计算a+b且以标准输出–每三个为一组(除非少于四个数)
输入规范:
每个输入文件包含一个测试例子,每个例子包含一对整数a和b,且$$ -10^{6} \leq a, b \leq 10^{6} $$。数字以空格分隔
输出规范:
对于每个测试例子,你应该输出a和b的和在一行,且和必须用标准模式输出
示例代码
1 |
|