Collatz Problem by TAKO/j0nKI

using S=System.Console;class A{static void Main(){for(int x=int.Parse(S.ReadLine());;x=x%2>0?x*3+1:x/2){S.WriteLine(x);if(x<2)break;}}}

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

download

return to the top page