Cody

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

Solution 412943

Submitted on 3 Mar 2014
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   Fail
%% x=[ 1 1 1 ; 4 2 3 ; 2 3 4]; y_correct = 1; assert(isequal(match_three(x),y_correct))

Error: Assertion failed.

### Community Treasure Hunt

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

Start Hunting!