Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
37363 | ☩Deutschland☩ | 判断字符串是否为回文 | C++ | 解答错误 | 0 MS | 236 KB | 232 | 2024-01-20 12:02:43 |
#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; }