Longest Repeated Substring FIXED by hallvabo

while 1:r=range(87);s=raw_input();print max([s[i:j]for i in r for j in r if-~s.find(s[i:j],i+1)],key=len)

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

download

return top