Cody

# Problem 2869. There are 10 types of people in the world

Solution 1792696

Submitted on 18 Apr 2019 by maeffchen
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
x = 1881;y_correct = 30; assert(isequal(yearraey(x),y_correct))

terminate = logical 0 k = 30

2   Pass
x = 2014;y_correct = 1; assert(isequal(yearraey(x),y_correct))

terminate = logical 0 k = 1

3   Pass
x = 2015;y_correct = 0; assert(isequal(yearraey(x),y_correct))

terminate = logical 1 k = 0

4   Pass
x = 606;y_correct = 27; assert(isequal(yearraey(x),y_correct))

terminate = logical 0 k = 27

5   Pass
x = 6006;y_correct = 71; assert(isequal(yearraey(x),y_correct))

terminate = logical 0 k = 71

6   Pass
x = 60006;y_correct = 369; assert(isequal(yearraey(x),y_correct))

terminate = logical 0 k = 369

7   Pass
k=zeros(1,15); for n=1:15 y=2^n+2; k(n)=yearraey(y); end y_correct=[1 1 5 3 11 7 23 15 47 31 95 63 191 127 383]; assert(isequal(k,y_correct))

terminate = logical 0 k = 1 terminate = logical 0 k = 1 terminate = logical 0 k = 5 terminate = logical 0 k = 3 terminate = logical 0 k = 11 terminate = logical 0 k = 7 terminate = logical 0 k = 23 terminate = logical 0 k = 15 terminate = logical 0 k = 47 terminate = logical 0 k = 31 terminate = logical 0 k = 95 terminate = logical 0 k = 63 terminate = logical 0 k = 191 terminate = logical 0 k = 127 terminate = logical 0 k = 383