Project Euler 21 - Amicable numbers
Project Euler 21 - Amicable numbers
Official link: https://projecteuler.net/problem=21
Thought Process
Thought Process
I modified my Divisors Function to make it return the sum of unique divisors, then I simply loop from 1 to 10,000 and if x = Divisors(Divisors(x)) then we have found an amicable number, all we need to do is remove the edge case if x = Divisors(x)
Interactive Code
Interactive Code
Input an integer (yourinput)
Code will output the sum of all amicable numbers less than yourinput along with the actual amicable numbers