happy number by leonid

p *(1..$$).select{|i|$:.map{i=eval"#{i}".gsub /./,'+\&**2'};i<2}

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

download

return top