Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37359 | IKUN(ZHC) | 判断字符串是否为回文 | C++ | Accepted | 1 MS | 248 KB | 235 | 2024-01-20 11:56:33 |
#include<bits/stdc++.h> using namespace std; int main(){ char a[100]; cin>>a; int i=0; int j=strlen(a)-1; while(i<=j&&a[i]==a[j]){ i++; j--; } if(i>j){ cout<<"yes"; }else{ cout<<"no"; } return 0; }