1 solutions
-
0
C :
#include<stdio.h> #include<string.h> main() { int z,x,q,i; char a[101],t[51]; scanf("%d",&z); getchar(); while(z--) { gets(a); do { x=strlen(a); if(x%2) break; for(i=0;i<x/2;i++) t[i]=a[x-1-i]; t[i]='\0'; a[x/2]='\0'; q=strcmp(a,t); }while(q==0); printf("%d\n",x); } }Pascal :
var s:string; x,j:longint; begin readln(s); x:=length(s); x:=x div 2; j:=0; while (x mod 2=0)and(x>2) do begin j:=j+1; x:=x div 2; end; writeln(j); end.
- 1
Information
- ID
- 16592
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By