{
"question_id": 995800, "question_title": "Sine的奇怪朋友", "question_content": "题目描述\nSine 的一个朋友疯了,最近他老爱说反话,别人说什么他就倒着说一遍,真是个奇怪的人。那他到底说了什么呢?\n(他说的话不超过 1000 个字符。)\n输入描述\n输入一个正整数 n,表示说话的次数。下面 n 行表示说的话\n输出描述\n占 n 行,每行表示对应输入的反话\n样例输入\n2\ni am speaking\nACMer\n样例输出\ngnikaeps ma i\n", "difficulty": "中等", "answer_id": 1169072, "answer_content": "\n```\n#include<stdio.h>\n#include<string.h>\n#define N 1000\nint main()\n{\n int i,m,n;\n char st1[N];\n char st2[N];\n memset(st1,0x0,N);\n memset(st1,0x0,N);\n scanf(\"%d\",&m);\n getchar();\n while(m--)\n {\n gets(st1);\n i = strlen(st1);\n for (n=0;i>0;)\n st2[n++] = st1[--i];\n st2[n] = '\\0';\n printf(\"%s\\n\",st2);\n }\n return 0;\n}\n\n```", "tag_name": "c语言", "cpp": "#include<stdio.h>\n#include<string.h>\n#define N 1000\nint main()\n{\n\tint i,m,n;\n\tchar st1[N];\n\tchar st2[N];\n\tmemset(st1,0x0,N);\n\tscanf(\"%d\",&m);\n\tgetchar();\n\twhile(m--)\n\t{\n\t\tgets(st1);\n\t\ti = strlen(st1);\n\t\tfor (n=0;i>0;)\n\t\t\tst2[n++] = st1[--i];\n\t\tst2[n] = '\\0';\n\t\tprintf(\"%s\\n\",st2);\n\t}\n\treturn 0;\n}", "topic_link": "https://bbs.csdn.net/topics/600470265", "status": 0, "keywords": "算法初阶,快速排序,快速排序的描述,排序和顺序统计量", "license": "csdn.net", "notebook": { "cpp": "https://codechina.csdn.net/csdn/csdn-daily-code/-/jupyter/master/data/notebook/answer/ipynb/cpp/76.ipynb?type=file" }, "notebook_enable": 1, "author": "xhsyy"
}