Cody

Problem 43193. Where is 1?

Solution 1148844

Submitted on 29 Mar 2017 by H M Dipu Kabir
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
A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(100); A(i,j,k)=1; y=find1number(A) assert(isequal(y,[i,j,k]))

max_ = logical 1 k = 35 max_ = logical 1 j = 75 max_ = logical 1 i = 54 y = 54 75 35 y = 54 75 35

2   Pass
A=zeros(100,100,100); i=randi(100); j=randi(100); k=randi(100); A(i,j,k)=1; y=find1number(A) assert(isequal(y,[i,j,k]))

max_ = logical 1 k = 25 max_ = logical 1 j = 16 max_ = logical 1 i = 86 y = 86 16 25 y = 86 16 25

Suggested Problems

More from this Author27