Cody

Solution 261433

Submitted on 14 Jun 2013 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 = kurchan_3x3 toc p=[1 4 7 2 5 8 3 6 9 1 2 3 4 5 6 7 8 9 1 5 9 4 8 3 7 2 6 7 5 3 8 6 1 9 4 2]; assert(isequal((1:9)',unique(m(:)))) % check use 1 thru 9 mp=prod(m(p),2); K=max(mp)-min(mp) % display K score % simplified Kurchan scoring for 3x3 assert(K<=198) % Pretty certain 198 is best possible, allow better score
m = 1 7 4 9 6 3 8 5 2 Elapsed time is 0.000735 seconds. K = 198