for(o=i=0;;)o?s[i=++i%52]==o?v+=o=s[++i]||print(v):1:[o]=[v]=s=readline()
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page