文章

5

粉丝

53

获赞

4

访问

1.8k

头像
翻转数的和 题解:用函数的简单解法
P1003 兰州大学机试题
发布于2024年3月8日 10:38
阅读数 198

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;

int main(){
    string a,b;
    int c,d;
    while(cin>>a>>b){
        reverse(a.begin(),a.end());
        reverse(b.begin(),b.end());
        cout<<atoi(a.c_str())+atoi(b.c_str())<<endl;
    }
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发