diff -r e87462c9b895 -r d29cd5883c7b pre_solution1/collatz.scala --- a/pre_solution1/collatz.scala Wed Nov 25 18:25:15 2020 +0000 +++ b/pre_solution1/collatz.scala Fri Nov 27 00:55:24 2020 +0000 @@ -31,6 +31,7 @@ */ + def is_pow(n: Long) : Boolean = (n & (n - 1)) == 0 def is_hard(n: Long) : Boolean = is_pow(3 * n + 1) @@ -41,6 +42,7 @@ last_odd(3 * n + 1) + //for (i <- 130 to 10000) println(s"$i: ${last_odd(i)}") //for (i <- 1 to 100) println(s"$i: ${collatz(i)}")