+ 27

[ ASSIGNMENT: ] Amicable Numbers

Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. The first ten amicable pairs are : (220, 284), (1184, 1210), (2620, 2924), (5020, 5564), (6232, 6368), (10744, 10856), (12285, 14595), (17296, 18416), (63020, 76084), and (66928, 66992). For Example : Enter the 1st number : 220 Enter the 2nd number : 284 They are a Pair of Amicable Numbers! TASK : Check Whether the Entered Numbers are a Pair of Amicable Numbers or Not?

22nd Apr 2018, 4:48 PM
Danijel Ivanović
Danijel Ivanović - avatar
21 ответ
14th Jul 2018, 3:11 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 18
https://code.sololearn.com/clgdHWMbZedv/?ref=app
23rd Apr 2018, 6:18 AM
LukArToDo
LukArToDo - avatar
+ 16
Xan Thank you Very Much!! 😀👍😉 for 👉 support 👈 😄👌😃
22nd Apr 2018, 5:07 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 14
VcC Sorry!! ☡❓ Check Whether the Entered Numbers are a Pair of Amicable Numbers or Not ?
22nd Apr 2018, 5:31 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 14
Donna They are not a Pair of Amicable Numbers, becouse we need Two Different Numbers, and first and smallest Amicable Pair is (220, 284)
22nd Apr 2018, 7:48 PM
Danijel Ivanović
Danijel Ivanović - avatar
22nd Apr 2018, 5:21 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 10
https://code.sololearn.com/cxJvZsx688K8/?ref=app
20th Jun 2018, 9:45 AM
Muhammad Hasan
Muhammad Hasan - avatar
+ 8
Here is my commented version on Python: https://code.sololearn.com/cOZCs98lM8bi/?ref=app As a BONUS you can generate all pairs of amicable numbers until given limit. Type 2 numbers to check if they are amicable. Type 1 number to print out all pairs of amicable numbers until this limit.
23rd Apr 2018, 1:29 AM
Nevfy
+ 6
22nd Apr 2018, 5:47 PM
VcC
VcC - avatar
+ 6
Here's mine! Used just one for loop. 😁(little tricky) https://code.sololearn.com/cWn0enVj2XEw/?ref=app
23rd Apr 2018, 4:29 PM
Fabio
+ 5
https://code.sololearn.com/cO7QMxc8JciO/?ref=app
22nd Apr 2018, 9:14 PM
Uni
Uni - avatar
24th Apr 2018, 10:28 AM
VcC
VcC - avatar
+ 4
Nice one Danijel! ☺ Looking forward to this one
22nd Apr 2018, 4:51 PM
Emma
+ 4
Tries to find amicable numbers: https://code.sololearn.com/c5AB0jkRMup1/?ref=app
22nd Apr 2018, 6:47 PM
Emma
+ 4
Remember: "Amicable numbers are two DIFFERENT numbers so related that the sum of the proper divisors of each is equal to the other number" 28 and 28, are not amicable numbers.
22nd Apr 2018, 6:53 PM
Emma
+ 4
It is probably too easy for everybody who successfully done this coding task, but anyway, here you will find a related challenge to solve: https://www.sololearn.com/Discuss/1235180/?ref=app
23rd Apr 2018, 10:50 PM
Nevfy
+ 4
Check out my try in Kotlin = It creates Amicable, N - Amicable Numbers in a range. https://code.sololearn.com/cjxf5eqWbzz2/?ref=app
16th Jul 2018, 2:25 PM
Salman
Salman - avatar
+ 3
Input + One liner..😀😉 // Enter two numbers separated by space.. https://code.sololearn.com/cdvrZDum4MAN/?ref=app
23rd Apr 2018, 11:42 AM
Zoetic_Zeel
Zoetic_Zeel - avatar