题解 | #数字颠倒#
数字颠倒
http://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
#include <iostream>
#include <string>
#include <algorithm>
//#include <math.h>
using namespace std;
int main(){
int num;
cin>>num;
string res = to_string(num);
reverse(res.begin(), res.end());
cout<<res<<endl;
return 0;
}
华为题库题解 文章被收录于专栏
牛客华为题库的题解
