marking1/collatz_test2.scala
author Christian Urban <urbanc@in.tum.de>
Tue, 20 Nov 2018 14:31:14 +0000
changeset 212 4bda49ec24da
parent 210 63a1376cbebd
child 267 9e0216756771
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     3
assert(collatz_max(10) == (19, 9))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     5
assert(collatz_max(100) == (118, 97))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     7
assert(collatz_max(1000) == (178, 871))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     9
assert(collatz_max(10000) == (261, 6171))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    11
assert(collatz_max(100000) == (350, 77031))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    13
assert(collatz_max(1000000) == (524, 837799))
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
212
4bda49ec24da updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    15
//assert(collatz_max(2) == (1, 2) || collatz_max(2) == (0, 1))
4bda49ec24da updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    16
assert(collatz_max(2) == (1, 2))
210
63a1376cbebd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    17
assert(collatz_max(77000) == (339, 52527))