提交记录 #122
提交时间:2024-11-05 16:21:35
语言:c
状态:Accepted
编译情况:编译成功
code.c: In function ‘main’:
code.c:5:5: warning: implicit declaration of function ‘gets’; did you mean ‘fgets’? [-Wimplicit-function-declaration]
5 | gets(str);int n=strlen(str);
| ^~~~
| fgets
/usr/bin/ld: /tmp/cc8A1c21.o: in function `main':
code.c:(.text.startup+0xe): warning: the `gets' function is dangerous and should not be used.
固定测试点#1:
固定测试点#2:
固定测试点#3:
固定测试点#4:
额外测试点#3600:
48【字符】回文字符串——递归
#include<stdio.h>
#include<string.h>
char str[100000];
int main(){
gets(str);int n=strlen(str);
for(int i=0,j=n-1;i<j;i++,j--) if(str[i]!=str[j]){
puts("No"); return 0;
}
puts("Yes");
return 0;
}