文章
21
粉丝
0
获赞
6
访问
1.5k
#include <stdio.h>
#include <string.h>
#include<iostream>
using namespace std;
int fz(int a){
int temp=a;
int ans=0;
while(temp>0){
ans=ans*10;//防止答案差10倍,先乘
int t=temp%10;
temp=temp/10;
ans+=t;
}
return ans;
}
int main() {
int a,b;
while(cin>>a>>b){
cout<<fz(a)+fz(b)<<endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发