【题解】PATA-1001 A+B Format
A+B Format(PATA-1001)
题面
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).
输入
Each input file contains one test case. Each case contains a pair of integers a and b where −106≤a,b≤106. The numbers are separated by a space.
输出
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.
样例输入
1 | -1000000 9 |
样例输出
1 | -999,991 |
提示
无
思路
代码
1 | int main() |