PAT(Advance Level)Practice

1001 A+B Format

题目:Calculate a+b and output the sum in standard formatthat is,the digits must be seperated into groups of three by commas (unless there are less than four digits).

Input 

Each inout file contains one test case.Each case contains a pair of integers a and b where -1000000<=a,b<=1000000.The number are sperated by a space.

Output 

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

猜你喜欢

转载自www.cnblogs.com/Catherinezhilin/p/9290507.html