Collatz Conjecture X65012


Statement
 

pdf   zip

html
Public test cases
  • Input

    6
    

    Output

    6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 [8]
    
  • Input

    7
    

    Output

    7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 [16]
    
  • Information
    Author
    HP CodeWars
    Language
    English
    Official solutions
    Python
    User solutions
    C++ Python