Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
37151 chenyanda 判断字符串是否为回文 C++ Compile Error 0 MS 0 KB 286 2024-01-19 15:23:40

Tests(0/0):


#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; } }


Judgement Protocol: