题目大意:直接就是给你一个数字串,将其逆序输出。
解题思路:无意中在CF上发现的比赛,资格赛的题目,只希望幸运之神眷顾我,我是那五分之一呀!我要T恤。so easy的题目,直接就用字符串接收,然后逆序输出即可。详见code。
题目来源:http://contest.bayan.ir/en/contest/qualification_2014/problem/A/
code:
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAXN = 6;
int cas;
char str[MAXN];
int main(){
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
scanf("%d",&cas);
while(cas--){
scanf("%s",str);
int len=strlen(str);
for(int i=len-1;i>=0;--i)
printf("%c",str[i]);
printf("\n");
}
return 0;
}