文章

6

粉丝

45

获赞

0

访问

1.3k

头像
c++
P1003 兰州大学机试题
发布于2024年4月2日 16:36
阅读数 134

#include <bits/stdc++.h>
using namespace std;

int fz(int n)
{
    int w =0;
    while(n>0)
    {
        w=w*10;
        w+=n%10;
        n=n/10;
    }
    return w;
}

int main ()
{
    int a,b;
    while(cin>>a>>b)
    {
        int s1=fz(a);
        int s2=fz(b);
        cout<<s1+s2<<endl;
    }
    return 0;
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发