小心零的个数TAT
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
int main()
{
int a,b,c;
scanf("%d %d",&a,&b);
c = a + b;
if(c < 0)
{
printf("-");
c = - c;
}
if(c < 1000) printf("%d",c);
else if(c < 1000000) printf("%d,%03d",c / 1000, c % 1000);
else printf("%d,%03d,%03d",c/1000000,c/1000%1000,c%1000);
return 0;
}
420

被折叠的 条评论
为什么被折叠?



