题解 | #数字颠倒#

数字颠倒

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


#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main(){
long n;
cin>>n;
vector<int> num_list;
string result;
while(n){
int a = n%10;
num_list.push_back(a);
n/=10;
}
for(int i = 0; i<num_list.size();i++){
result += to_string(num_list[i]);
}
cout<< result;
return 0;</int></vector></string></iostream>

}

//最笨方法

全部评论

相关推荐

这不纯纯作弊了吗😢😢😢
编程界菜鸡:信这个的这辈子有了,这智商你靠啥都没用
点赞 评论 收藏
分享
05-26 22:25
门头沟学院 Java
Java小肖:不会是想叫你过去把你打一顿吧,哈哈哈
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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