文章
10
粉丝
179
获赞
33
访问
38.2k
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF=1e9;
int n=0;
string a,b;
int sum=0;
vector<int> ve;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
while(cin>>a>>b){ //输入两个字符串代替翻转数
reverse(a.begin(),a.end());//获得原数
reverse(b.begin(),b.end());
sum+=stoi(a)+stoi(b);//将字符串直接转换为整数并且相加
cout<<sum<<endl;
sum=0;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发