Cody

# Problem 42673. Longest Collatz Sequence

Solution 2086467

Submitted on 10 Jan 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
x = 10; assert(isequal(euler14(x),9))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test1 (line 2) assert(isequal(euler14(x),9))

2   Fail
x = 100; assert(isequal(euler14(x),97))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test2 (line 2) assert(isequal(euler14(x),97))

3   Fail
x = 96; assert(isequal(euler14(x),73))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test3 (line 2) assert(isequal(euler14(x),73))

4   Fail
x = 1000; assert(isequal(euler14(x),871))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test4 (line 2) assert(isequal(euler14(x),871))

5   Fail
x = 870; assert(isequal(euler14(x),703))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test5 (line 2) assert(isequal(euler14(x),703))

6   Fail
assert(isequal(euler14(871),871))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test6 (line 1) assert(isequal(euler14(871),871))

7   Fail
x = 77030; assert(isequal(euler14(x),52527))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test7 (line 2) assert(isequal(euler14(x),52527))

8   Fail
x = 77031; assert(isequal(euler14(x),77031))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test8 (line 2) assert(isequal(euler14(x),77031))

9   Fail
assert(isequal(euler14(500000),410011))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test9 (line 1) assert(isequal(euler14(500000),410011))

10   Fail
z = 900000; y_correct=837799; assert(isequal(euler14(z),y_correct))

Undefined function 'euler14' for input arguments of type 'double'. Error in Test10 (line 3) assert(isequal(euler14(z),y_correct))