for(;l=readline(i=1);print(s))for(n=0;t=l.slice(i-1,i+n),t[n];)~l.indexOf(t,i)?s=++n&&t:i++
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page