首页 > 试题广场 >

A+B Format (20)

[编程题]A+B Format (20)
  • 热度指数:3926 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32M,其他语言64M
  • 算法知识视频讲解
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 -1000000 <= a, b <= 1000000.  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

输出

-999,991