happy number by nn

:cm L let@
:wh@n<2000|Ln=@n+1|Lv=@n|wh@v>4|Lu=0|wh@v>0|Lu=@u+(@v%10)*(@v%10)|Lv=@v/10|endw|Lv=@u|endw|LO=@v<2?@n."\n":""|endw
i\x12o
\x1bZZ

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

download

return to the top page