题解 | #单组_字符串#
单组_字符串
https://www.nowcoder.com/practice/e3a57b2ff6de4aefb82af98925df544e
#include <stdio.h>
#include <stdlib.h>
int main() {
int n;
scanf("%d\n", &n);
char* s = (char*)malloc((n + 1) * sizeof(char));
for (int i = 0; i < n; i++) {
char tmp;
scanf("%c", &tmp);
s[n-i-1] = tmp;
}
printf("%s\n", s);
free(s);
return 0;
}
