happy number by *yuko*

#define f(x)+sqr(k div$apow x mod$a)
var i,k:word;begin repeat i:=i+1;k:=i;while k>6do k:=f(3)f(2)f(1)f(0);if k=1then writeln(i)until i>2e3end.

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

download

return to the top page