题解 | #数字颠倒#
数字颠倒
https://www.nowcoder.com/practice/ae809795fca34687a48b172186e3dafe
#include <stdio.h> #include <string.h> int main() { char s[10000000]={0}; scanf("%s",s); int N=strlen(s); char *p=s; while(*p!='\0'){ p++; } p--; for (int i=0; i<N; i++) { printf("%c",*p); p--; } printf("\n"); return 0; }