Cody

Solution 1311267

Submitted on 23 Oct 2017 by ABHILASH SINGH
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 = 5; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '101' d = 3 c = 1 c = 1 0 c = 1 0 1 c = 2

2   Pass
x = 1; y_correct = false; assert(isequal(isPernicious(x),y_correct))

b = '1' d = 1 c = 1 c = 1

3   Pass
x = 2^randi(16); y_correct = false; assert(isequal(isPernicious(x),y_correct))

b = '1000000' d = 7 c = 1 c = 1 0 c = 1 0 0 c = 1 0 0 0 c = 1 0 0 0 0 c = 1 0 0 0 0 0 c = 1 0 0 0 0 0 0 c = 1

4   Pass
x = 17; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '10001' d = 5 c = 1 c = 1 0 c = 1 0 0 c = 1 0 0 0 c = 1 0 0 0 1 c = 2

5   Pass
x = 18; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '10010' d = 5 c = 1 c = 1 0 c = 1 0 0 c = 1 0 0 1 c = 1 0 0 1 0 c = 2

6   Pass
x = 61; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '111101' d = 6 c = 1 c = 1 1 c = 1 1 1 c = 1 1 1 1 c = 1 1 1 1 0 c = 1 1 1 1 0 1 c = 5

7   Pass
x = 6; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '110' d = 3 c = 1 c = 1 1 c = 1 1 0 c = 2

8   Pass
x = 2115; y_correct = false; assert(isequal(isPernicious(x),y_correct))

b = '100001000011' d = 12 c = 1 c = 1 0 c = 1 0 0 c = 1 0 0 0 c = 1 0 0 0 0 c = 1 0 0 0 0 1 c = 1 0 0 0 0 1 0 c = 1 0 0 0 0 1 0 0 c = 1 0 0 0 0 1 0 0 0 c = 1 0 0 0 0 1 0 0 0 0 c = 1 0 0 0 0 1 0 0 0 0 1 c = 1 0 0 0 0 1 0 0 0 0 1 1 c = 4

9   Pass
x = 2114; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '100001000010' d = 12 c = 1 c = 1 0 c = 1 0 0 c = 1 0 0 0 c = 1 0 0 0 0 c = 1 0 0 0 0 1 c = 1 0 0 0 0 1 0 c = 1 0 0 0 0 1 0 0 c = 1 0 0 0 0 1 0 0 0 c = 1 0 0 0 0 1 0 0 0 0 c = 1 0 0 0 0 1 0 0 0 0 1 c = 1 0 0 0 0 1 0 0 0 0 1 0 c = 3

10   Pass
x = 2017; y_correct = true; assert(isequal(isPernicious(x),y_correct))

b = '11111100001' d = 11 c = 1 c = 1 1 c = 1 1 1 c = 1 1 1 1 c = 1 1 1 1 1 c = 1 1 1 1 1 1 c = 1 1 1 1 1 1 0 c = 1 1 1 1 1 1 0 0 c = 1 1 1 1 1 1 0 0 0 c = 1 1 1 1 1 1 0 0 0 0 c = 1 1 1 1 1 1 0 0 0 0 1 c = 7