Cody

# Problem 2225. Three...is a magic number.

Solution 1755655

Submitted on 20 Mar 2019 by Overphil
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=[ 1 2 7 6 7 2 7 7 ; 7 7 5 3 5 3 2 5 ; 1 6 5 4 3 5 7 5 ; 6 6 7 4 6 3 7 1 ; 4 2 4 2 2 5 5 6 ; 2 4 4 7 4 4 2 7 ; 7 4 2 3 6 4 7 1 ; 4 6 4 2 5 5 1 4]; y_correct = 0; assert(isequal(match_three(x),y_correct))

2   Pass
x=mod(magic(4),4); y_correct = 0; assert(isequal(match_three(x),y_correct))

3   Pass
x=mod(magic(7),2); y_correct = 1; assert(isequal(match_three(x),y_correct))

4   Pass
x=[5 2 3 ; 5 3 2 ; 5 4 1] ; y_correct = 1; assert(isequal(match_three(x),y_correct))

5   Pass
x=[ 3 3 4 2 1 3 1 5 4 3 1 6 1 5 3 6 1 2 3 1 5 3 3 2 5 6 3 1 3 6 5 3 1 5 6 4 2 4 2 4 3 3 2 6 5 1 5 1 4]; y_correct = 1; assert(isequal(match_three(x),y_correct))

6   Pass
x=[ 1 1 1 ; 4 2 3 ; 2 3 4]; y_correct = 1; assert(isequal(match_three(x),y_correct))

7   Pass
x=[ 1 2 3 ; 4 5 6 ; 7 8 9]; y_correct = 0; assert(isequal(match_three(x),y_correct))

8   Pass
x=[ 1 1 1 1 ; 2 4 6 8 ; 3 6 9 12 ; 4 8 12 16]; y_correct = 1; assert(isequal(match_three(x),y_correct))

9   Pass
x=[ 1 5 7 9 ; 1 5 7 9 ; 2 4 6 8 ; 1 5 7 9]; y_correct = 0; assert(isequal(match_three(x),y_correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!