题目来源:信息学奥赛一本通
题目描述:
输入一个非负整数,输出这个数的倒序数。例如输入123,输出321。
题意解释:
输入一个非负整数,输出这个数的倒序数。例如输入123,输出321。
输入:
输入一个非负整数(保证个位不为零)。
输出:
输出倒序的数。
题目链接:
http://ybt.ssoier.cn:8088/problem_show.php?pid=1160
数据解释:
可开字符数组:n<=10000005
AC代码:
利用字符数组:
#include<bits/stdc++.h>
using namespace std;
char a[100000005];
int main(){
cin>>a;
int len=strlen(a);
for(int i=len-1;i>=0;i--){
cout<<a[i];
}
return 0;
}