equal
deleted
inserted
replaced
1 //def myassert(cond : => Boolean) = { |
|
2 // try { |
|
3 // assert(cond) |
|
4 // } catch { |
|
5 // case _ : Throwable => System.exit(1) |
|
6 // } |
|
7 //} |
|
8 |
|
9 assert(CW6a.collatz_max(10) == (19, 9)) |
|
10 assert(CW6a.collatz_max(100) == (118, 97)) |
|
11 assert(CW6a.collatz_max(1000) == (178, 871)) |
|
12 assert(CW6a.collatz_max(10000) == (261, 6171)) |
|
13 assert(CW6a.collatz_max(100000) == (350, 77031)) |
|
14 assert(CW6a.collatz_max(1000000) == (524, 837799)) |
|
15 assert(CW6a.collatz_max(2) == (1, 2)) |
|
16 assert(CW6a.collatz_max(77000) == (339, 52527)) |
|