Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
15585 | 马德理666 | 判断字符串是否为回文 | C++ | Accepted | 0 MS | 256 KB | 231 | 2023-04-23 22:43:00 |
#include<bits/stdc++.h> using namespace std; int main() { char a[100]; gets(a); int i=0,j=strlen(a)-1; while((i<j)&&(a[i]==a[j])){ i++; j--; } if(i>=j) cout<<"yes"<<endl; else cout<<"no"<<endl; return 0; }