Cody

Problem 42777. GJam March 2016 IOW: Polynesiaglot Small

Solution 855262

Submitted on 23 Mar 2016 by James
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   Pass
tic m=[1 1 4 ]; v=Polyglot(m); vexp=[5 ]; assert(isequal(vexp,v))

Q = 5

2   Pass
m=[1 1 7 ]; v=Polyglot(m); vexp=[21 ]; assert(isequal(vexp,v))

Q = 21

3   Pass
m=[1 1 1 ]; v=Polyglot(m); vexp=[1 ]; assert(isequal(vexp,v))

Q = 1

4   Pass
m=[1 1 13 ]; v=Polyglot(m); vexp=[377 ]; assert(isequal(vexp,v))

Q = 377

5   Pass
m=[1 1 5 ]; v=Polyglot(m); vexp=[8 ]; assert(isequal(vexp,v))

Q = 8

6   Pass
m=[1 1 6 ]; v=Polyglot(m); vexp=[13 ]; assert(isequal(vexp,v))

Q = 13

7   Pass
m=[1 1 14 ]; v=Polyglot(m); vexp=[610 ]; assert(isequal(vexp,v))

Q = 610

8   Pass
m=[1 1 2 ]; v=Polyglot(m); vexp=[2 ]; assert(isequal(vexp,v))

Q = 2

9   Pass
m=[1 1 11 ]; v=Polyglot(m); vexp=[144 ]; assert(isequal(vexp,v))

Q = 144

10   Pass
m=[1 1 8 ]; v=Polyglot(m); vexp=[34 ]; assert(isequal(vexp,v))

Q = 34

11   Pass
m=[1 1 3 ]; v=Polyglot(m); vexp=[3 ]; assert(isequal(vexp,v))

Q = 3

12   Pass
m=[1 1 10 ]; v=Polyglot(m); vexp=[89 ]; assert(isequal(vexp,v))

Q = 89

13   Pass
m=[1 1 9 ]; v=Polyglot(m); vexp=[55 ]; assert(isequal(vexp,v))

Q = 55

14   Pass
m=[1 1 12 ]; v=Polyglot(m); vexp=[233 ]; assert(isequal(vexp,v))

Q = 233

15   Pass
m=[1 1 15 ]; v=Polyglot(m); vexp=[987 ]; assert(isequal(vexp,v)) toc

Q = 987 Elapsed time is 0.690793 seconds.