Cody

Problem 45424. Amicable pair

Solution 2916613

Submitted on 6 Sep 2020 by Rafael S.T. Vieira
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
assert(isequal(amicable_count(100),0))

2   Pass
assert(isequal(amicable_count(1000),1))

3   Pass
assert(isequal(amicable_count(5000),3))

4   Pass
assert(isequal(amicable_count(10000),5))

5   Pass
assert(isequal(amicable_count(20000),8))

6   Pass
assert(isequal(amicable_count(30000),8))

7   Pass
assert(isequal(amicable_count(50000),8))

8   Pass
%assert(isequal(amicable_count(100000),13))

9   Pass
%assert(isequal(amicable_count(2000000),8))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!