Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6223 邓小龙 回文字符串I C++ Wrong Answer 0 MS 268 KB 348 2025-01-13 16:11:25

Tests(0/10):


Code:

# include<iostream> using namespace std; int main(){ char s[1001]; cin>>s; int n=0; for(int i=0;s[i]!='\0';i++)//计算s的长度 n++; bool f=true; for(int i=0;i<=n/2;i++){ if(s[i]!=s[n-1-i]) {f=false;break;} } if(f==false) cout<<"no"<<endl; else cout<<"yes"<<endl; return 0; }


Run Info:

------Input------
aabbaa
------Answer-----
Yes
------Your output-----
yes