题解 | 数字颠倒

数字颠倒

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

#include<bits/stdc++.h>// 万能头

#include <string>

using namespace std;

int main()

{

    int n;

    string s; // 定义

    cin>>s;// 字符串输入

    reverse(s.begin(),s.end());// 用头文件algorithm的内置函数将其倒置

    cout<<s; // 输出答案

}

活动地址: 牛客春招刷题训练营 - 编程打卡活动

全部评论

相关推荐

每晚夜里独自颤抖:把华北改为华南再试一试,应该就没啥问题了。改完可能都不用投,别人主动联系了。
点赞 评论 收藏
分享
Rena1ssanc...:对的,要是面评没太烂,勤更新简历等捞就行了,腾讯可以无限复活
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

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