author | Christian Urban <christian.urban@kcl.ac.uk> |
Wed, 04 Nov 2020 14:46:03 +0000 | |
changeset 349 | 682611a0fb89 |
parent 281 | 87b9e3e2c1a7 |
permissions | -rw-r--r-- |
//def myassert(cond : => Boolean) = { // try { // assert(cond) // } catch { // case _ : Throwable => System.exit(1) // } //} assert(CW6a.collatz_max(10) == (19, 9)) assert(CW6a.collatz_max(100) == (118, 97)) assert(CW6a.collatz_max(1000) == (178, 871)) assert(CW6a.collatz_max(10000) == (261, 6171)) assert(CW6a.collatz_max(100000) == (350, 77031)) assert(CW6a.collatz_max(1000000) == (524, 837799)) assert(CW6a.collatz_max(2) == (1, 2)) assert(CW6a.collatz_max(77000) == (339, 52527))