Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44642 | zhangchunhong | 判断字符串是否为回文 | C++ | Compile Error | 0 MS | 0 KB | 250 | 2024-03-31 18:12:56 |
#include<iostream> #include<cstring> using namespace std; char a[100] int i,j; int main() { cin>>a; int len=strlen(a); i=0; j=len-1; while(a[i]==a[j]&&i<=j){ i++; j--; } if(i>j) cout<<"yes"; else cout<<"no"; return 0; }