This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
m = 220; n = 284;
y_correct = true;
assert(isequal(amicable(m,n),y_correct))
ans =
220 284
ans =
logical
1
|
2 | Pass |
m = 220; n = 504;
y_correct = false;
assert(isequal(amicable(m,n),y_correct))
ans =
1056 284
ans =
logical
0
|
3 | Pass |
m = 2620; n = 2924;
y_correct = true;
assert(isequal(amicable(m,n),y_correct))
ans =
2620 2924
ans =
logical
1
|
4 | Pass |
m = 5020; n = 5564;
y_correct = true;
assert(isequal(amicable(m,n),y_correct))
ans =
5020 5564
ans =
logical
1
|
5 | Pass |
m = 2924; n = 5020;
y_correct = false;
assert(isequal(amicable(m,n),y_correct))
ans =
5564 2620
ans =
logical
0
|
926 Solvers
Longest run of consecutive numbers
1646 Solvers
2537 Solvers
Find last zero for each column
238 Solvers
142 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!