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 −106≤a,b≤106. 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
结尾无空行
Sample Solution:
if __name__ == '__main__':
arr=input().split()
a=int(arr[0])
b=int(arr[1])
c=a+b
re=str(c)
for i in range(len(re)):
print(re[i],end="")
t=len(re)-i-1
if re[i]=='-':
continue
if t!=0 and t%3==0:
print(',',end="")