Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
44117 chenyanda 判断字符串是否为回文 C++ 通过 1 MS 256 KB 287 2024-03-29 14:54:03

Tests(4/4):


#include<iostream> #include<cstring> using namespace std; int main() { char s[100]; int len,position; int i,j; gets(s); len=strlen(s); i=0; j=len-1; while(i<j&&s[i]==s[j]){ i++; j--; } if(i>=j){ cout<<"yes"<<endl; } else{ cout<<"no"<<endl; } }


测评信息: