find minimum cyclic parts by chocobi

char s[999];i;main(n){for(;gets(s);s[n]=0,puts(s))for(n=1,i=0;s[i]+i%n;)i=s[i]-s[i%n]?++n*0:i+1;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page