pre_testing1/collatz_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Tue, 24 Nov 2020 23:36:21 +0000
changeset 367 e6ae724255a8
parent 345 40657f9a4e4a
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     1
import CW6a._
125
dcaab8068baa updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
199
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     3
assert(collatz_max(10) == (19, 9))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     4
assert(collatz_max(100) == (118, 97))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     5
assert(collatz_max(1000) == (178, 871))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     6
assert(collatz_max(10000) == (261, 6171))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     7
assert(collatz_max(100000) == (350, 77031))
54befaf23648 updated
Christian Urban <urbanc@in.tum.de>
parents: 144
diff changeset
     8
assert(collatz_max(1000000) == (524, 837799))