C++简洁代码:
#include<bits/stdc++.h>
using namespace std;
int main () {
int nums;
cin >> nums;
string str = to_string(nums);
reverse(str.begin(),str.end());
cout << str;
return 0;
}
C++简洁代码:
#include<bits/stdc++.h>
using namespace std;
int main () {
int nums;
cin >> nums;
string str = to_string(nums);
reverse(str.begin(),str.end());
cout << str;
return 0;
}