Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
44240 奚晨瑞 判断字符串是否为回文 C++ 通过 1 MS 244 KB 285 2024-03-29 15:43:47

Tests(4/4):


#include<iostream> #include<cstring> using namespace std; char a[101]; int main() { cin>>a; int b=strlen(a); bool t=0; for(int i=0;2*i<b-1;i++){ if(a[i]!=a[b-1-i]){ t=1; break; } } if(t==0){ cout<<"yes"; } else{ cout<<"no"; } return 0; }


测评信息: