1 条题解
-
0
#include<bits/stdc++.h> using namespace std; bool huiwen(char s[]) { bool t=true; for(int i=0;i<strlen(s)/2;i++) { if(s[i]!=s[strlen(s)-i-1]) { t=false; } } return t; } int main(){ char s[10000]; gets(s); while(huiwen(s)==true&&strlen(s)%2==0) { s[strlen(s)/2]='\0'; } cout<<strlen(s)<<" "; return 0; }
- 1
信息
- ID
- 135
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- 6
- 标签
- (无)
- 递交数
- 293
- 已通过
- 98
- 上传者