Cody

Solution 896035

Submitted on 26 May 2016 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
y = kurchan_4x4 uy=unique(y(:)); assert(isequal(uy,[1:16]')); dg = @(mm) spdiags([mm mm],1:length(mm)); py=prod([y y' dg(y) dg(flipud(y))]); cody_score=max(py)-min(py); fprintf('Maximum product of your matrix = %.0f \n',max(py)) fprintf('Minimum product of your matrix = %.0f \n',min(py)) fprintf('Kurchan score of your matrix = %.0f \n',cody_score) feval(@assignin,'caller','score',cody_score);

junk = 2.1360e+05 a = 1 15 8 11 16 12 3 13 10 2 6 5 7 14 4 9 y = 1 15 6 13 11 12 3 9 8 2 16 5 14 10 4 7 Maximum product of your matrix = 4320 Minimum product of your matrix = 1092 Kurchan score of your matrix = 3228

Suggested Problems

More from this Author80