| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82358 | Kevin | 回文数 | C++ | Accepted | 1 MS | 264 KB | 315 | 2024-07-13 10:59:23 |
#include<bits/stdc++.h> using namespace std; char a[1000]; int main(){ int flag=1; gets(a); int len=strlen(a); for(int i=0,j=len-1;i<len,j>=0;i++,j--){ if(a[i]==a[j]) { flag=1; } else{ flag=0; break; } } if(flag==1) cout<<"YES"; else cout<<"NO"; return 0; }