Collatz Problem by GreaseMonkey

main(q){for(scanf("%i",&q);q;q=q>1&&q&1?q*3+1:q/2)printf("%i\n",q);}

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

download

return to the top page