while(0<1)println{var u=Seq("") readLine split' 'map{s=>var r,d=s diff"-" u=u.filter{t=>d=t diff s if(d!=t)r+=d d==t}:+r.sorted sortBy(_.size)} u(1)+" "+u.last}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page