1 #include<cstdio> 2 #include<cstdlib> 3 int main(){ 4 long A,B,C,SUM; 5 scanf("%ld%ld",&A,&B); 6 SUM = A + B; 7 C = abs(SUM); 8 if(C < 1000) 9 printf("%ld",SUM); 10 if(C >= 1000 && C < 1000000) 11 printf("%ld,%03ld",SUM/1000,C%1000); 12 if(C >= 1000000) 13 printf("%ld,%03ld,%03ld",SUM/1000000,(C/1000)%1000,C%1000); 14 return 0; 15 }