文章
5
粉丝
0
获赞
8
访问
305
//方法一 使用string
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
while(cin>>a>>b){
reverse(a.begin(),a.end());
reverse(b.begin(),b.end());
cout<<stoi(a)+stoi(b)<<endl;
}
return 0;
//法二传统
#include<bits/stdc++.h>
using namespace std;
int getReverse(int n){
int temp = 0;
int sum = 0;
while(n>0){
temp = n%10;
sum = sum*10+temp;
n/=10;
}
return sum;
...
登录后发布评论
暂无评论,来抢沙发