marking1/collatz_test2.scala
changeset 210 63a1376cbebd
parent 158 94b11ac19b41
child 212 4bda49ec24da
equal deleted inserted replaced
209:40bdf9064e13 210:63a1376cbebd
     1 
     1 
     2 
     2 
     3 assert(CW6a.collatz_max(10) == (20, 9))
     3 assert(collatz_max(10) == (19, 9))
     4 
     4 
     5 assert(CW6a.collatz_max(100) == (119, 97))
     5 assert(collatz_max(100) == (118, 97))
     6 
     6 
     7 assert(CW6a.collatz_max(1000) == (179, 871))
     7 assert(collatz_max(1000) == (178, 871))
     8 
     8 
     9 assert(CW6a.collatz_max(10000) == (262, 6171))
     9 assert(collatz_max(10000) == (261, 6171))
    10 
    10 
    11 assert(CW6a.collatz_max(100000) == (351, 77031))
    11 assert(collatz_max(100000) == (350, 77031))
    12 
    12 
    13 assert(CW6a.collatz_max(1000000) == (525, 837799))
    13 assert(collatz_max(1000000) == (524, 837799))
    14 
    14 
    15 assert(CW6a.collatz_max(2) == (2, 2))
    15 assert(collatz_max(2) == (1, 2) || collatz_max(2) == (0, 1))
    16 
    16 
    17 assert(CW6a.collatz_max(77000) == (340, 52527))
    17 assert(collatz_max(77000) == (339, 52527))