Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 0:3; y_correct = 33; assert(isequal(lowest_number(x),y_correct))
l =
0
x =
1 2 3
|
2 | Fail |
x=[1 2 3 7 8 9] ; y_correct = 417;
assert(isequal(lowest_number(x),y_correct))
l =
1×0 empty double row vector
x =
1 2 3 7 8 9
|
3 | Fail |
x=[7 8 9 7 8 9] ; y_correct = 1578;
assert(isequal(lowest_number(x),y_correct))
l =
1×0 empty double row vector
x =
7 7 8 8 9 9
|
4 | Fail |
x = 0:9; y_correct = 34047; assert(isequal(lowest_number(x),y_correct))
l =
0
x =
1 2 3 4 5 6 7 8 9
|
5 | Fail |
x=7*[ones(1,5) zeros(1,7)]; y_correct=1400084; assert(isequal(lowest_number(x),y_correct))
l =
0 0 0 0 0 0 0
x =
7 7 7 7 7
|
6 | Fail |
x=[ones(1,8) zeros(1,10)]; y_correct=200000222; assert(isequal(lowest_number(x),y_correct))
l =
0 0 0 0 0 0 0 0 0 0
x =
1 1 1 1 1 1 1 1
|
7 | Fail |
x = [0:9 1:8]; y_correct = 225802467; assert(isequal(lowest_number(x),y_correct))
l =
0
x =
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9
|
8 | Fail |
x=[randperm(10)-1 randperm(6)]; y_correct=22580247; assert(isequal(lowest_number(x),y_correct))
l =
0
x =
1 1 2 2 3 3 4 4 5 5 6 6 7 8 9
|
Project Euler: Problem 5, Smallest multiple
397 Solvers
579 Solvers
Getting the absolute index from a matrix
211 Solvers
724 Solvers
121 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!