题解 | 数字颠倒

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

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

全部评论

相关推荐

点赞 评论 收藏
分享
09-12 11:55
已编辑
湖南工商大学 Java
那一天的Java_J...:这种一堆问题的,别去
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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