Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
y=[2000 100
1 2]
assert(isequal(coin(2200),y))
y =
2000 100
1 2
ans =
4
6
10
12
14
16
18
20
|
2 | Fail |
y=[100,20,2;2,1,1]
assert(isequal(coin(222),y))
y =
100 20 2
2 1 1
ans =
2
4
6
10
14
16
20
|
3 | Fail |
y=[2000 500 100 50 20 10 5 2 1
3 1 2 1 1 1 1 1 1]
assert(isequal( coin(6788),y))
y =
2000 500 100 50 20 10 5 2 1
3 1 2 1 1 1 1 1 1
ans =
4
|
4 | Fail |
y=[2000 100 20 5 2 1
56728 3 2 1 1 1]
assert(isequal( coin(113456348),y))
y =
2000 100 20 5 2 1
56728 3 2 1 1 1
ans =
4
6
10
14
|
5 | Fail |
y=[2;2]
assert(isequal( coin(4),y))
y =
2
2
ans =
2
4
6
8
10
12
14
16
20
|
6 | Fail |
y=[1000 100 20 5 2
1 4 2 1 2]
assert(isequal( coin(1449),y))
y =
1000 100 20 5 2
1 4 2 1 2
ans =
2
6
10
14
20
|
Least common multiple of many numbers
189 Solvers
Is my wife right? Now with even more wrong husband
1241 Solvers
171 Solvers
Create a matrix X, where each column is a shifted copy of the vector v
142 Solvers
302 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!