Challenge: Numbers with Friends | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Challenge: Numbers with Friends

The sum of all natural ( positive integer ) number of dividers 220, except 220, is equal to 1+2+4+5+10+11+20+22+44+55+110 = 284 and the sum of all natural number of dividers 284 , except himself is equal to 1+2+4+71+142 = 220 . The numbers 220 and 284 are called friends. Generally, we say that two positive integers are friends if each of their divisors' sum (Excluding the number itself) equal the other number. Write the program to calculate all number friends from 2 to

29th Aug 2017, 7:46 PM
Real Coders
Real Coders - avatar
6 Answers
31st Aug 2017, 3:08 PM
Infinity
Infinity - avatar
+ 5
But what about perfect nos .!!!??? They have no friends lol!!! Or they r their own friends....!
31st Aug 2017, 3:13 PM
Infinity
Infinity - avatar
+ 2
first (recycled from another challenge about same topic 😁) https://code.sololearn.com/c19i5PHXvRTF/?ref=app
29th Aug 2017, 8:57 PM
Luca
Luca - avatar
+ 2
https://www.sololearn.com/Discuss/553615/?ref=app https://code.sololearn.com/cigSFdt6AYrF/?ref=app
29th Aug 2017, 10:05 PM
hamletmun
hamletmun - avatar
+ 1
mine on C#. They does not repeat https://code.sololearn.com/c916HGEdAw88/?ref=app
31st Aug 2017, 7:27 PM
Alex Gorbacov
Alex Gorbacov - avatar
30th Aug 2017, 8:07 AM
Oberyin
Oberyin - avatar