Collatz Problem by Hex

using C=System.Console;class P{static void Main(){for(int i=int.Parse(C.ReadLine());i>0;i=i%2>1/~-i?i*3+1:i/2)C.WriteLine(i);}}

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

download

return to the top page