marking1/collatz_test2.scala
author Christian Urban <urbanc@in.tum.de>
Wed, 16 Jan 2019 12:24:47 +0000
changeset 254 2801734b934a
parent 212 c86e40fb3b21
child 267 10a2ef26a92c
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     3
assert(collatz_max(10) == (19, 9))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     5
assert(collatz_max(100) == (118, 97))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     7
assert(collatz_max(1000) == (178, 871))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
     9
assert(collatz_max(10000) == (261, 6171))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    11
assert(collatz_max(100000) == (350, 77031))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    13
assert(collatz_max(1000000) == (524, 837799))
158
f60e0908f80b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
212
c86e40fb3b21 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    15
//assert(collatz_max(2) == (1, 2) || collatz_max(2) == (0, 1))
c86e40fb3b21 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    16
assert(collatz_max(2) == (1, 2))
210
34f935e13bdd updated
Christian Urban <urbanc@in.tum.de>
parents: 158
diff changeset
    17
assert(collatz_max(77000) == (339, 52527))