题解 | #23年OPPO-a的翻转#

23年OPPO-a的翻转

https://www.nowcoder.com/practice/dcce2d0cc8f740c29e0885df96c9d625

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

int main() {
    int a,b;
    cin>>a;
    string s;
    s=to_string(a);
    reverse(s.begin(),s.end());
    b = std::stoi(s);
    cout<<a+b;
}
// 64 位输出请用 printf("%lld")

全部评论

相关推荐

05-20 13:59
门头沟学院 Java
米黑子米黑子:你这个成绩不争取下保研?
点赞 评论 收藏
分享
评论
2
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务