Collatz Problem by chocobi

using C=System.Console;class M{static void Main(){for(int i=int.Parse(C.ReadLine());i>0;i=i<2?0:i%2>0?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