Catherine_zhilin

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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

 

posted on 2018-07-10 17:45  kkkshiki  阅读(241)  评论(0编辑  收藏  举报