Cody

Problem 1190. Golomb's self-describing sequence (based on Euler 341)

Solution 1197924

Submitted on 25 May 2017
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
assert(isequal(euler341(1),1))

ans = -1 ans = 0

Assertion failed.

2   Fail
assert(isequal(euler341(10),5))

ans = -1 ans = 4

Assertion failed.

3   Fail
assert(isequal(euler341(310),42))

ans = -1 ans = 41

Assertion failed.

4   Fail
assert(isequal(euler341(4242),210))

ans = -1 ans = 209

Assertion failed.

5   Fail
assert(isequal(euler341(328509),3084))

ans = -1 ans = 3083

Assertion failed.

6   Fail
assert(isequal(euler341(551368),4247))

ans = -1 ans = 4246

Assertion failed.

7   Fail
assert(isequal(euler341(614125),4540))

ans = -1 ans = 4539

Assertion failed.