#include<iostream>
#include<vector>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
int sum=a+b;
vector<int> v;
if(sum==0){
cout<<0;
return 0;
}
if(sum<0){
cout<<"-";
sum=sum*(-1);
}
while(sum>0){
v.push_back(sum%10);
sum=sum/10;
}
for(int i=v.size()-1;i>=0;i--){
cout<<v[i];
if(i%3==0&&i!=0) cout<<",";
}
}
PAT甲级1001 A+B Format
最新推荐文章于 2024-08-29 22:25:44 发布