shortest non occuring sequence by rolf

f=lambda s:f(s/6)+"aabcde"[s%6]if s else""
while 1:
 l=raw_input();s=1
 while s:t=f(s);s=[s+1,0][l.find(t)<0]
 print t

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

download

return to the top page