find minimum cyclic parts by Defenestrator

while 1:s=raw_input();n=len(s);i=1;exec"i+=n/i*s[:i]!=s;"*n;print s[:i]

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

download

return to the top page