+ 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?
21 ответ
+ 18
https://code.sololearn.com/clgdHWMbZedv/?ref=app
+ 16
Xan
Thank you Very Much!! 😀👍😉
for 👉 support 👈 😄👌😃
+ 14
VcC
Sorry!! ☡❓
Check Whether the Entered Numbers are a Pair of Amicable Numbers or Not ?
+ 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)
+ 10
https://code.sololearn.com/cxJvZsx688K8/?ref=app
+ 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.
+ 6
thanks. but in one line, ok ?
https://code.sololearn.com/c3fdP9Yg2e5p/?ref=app
+ 6
Here's mine!
Used just one for loop. 😁(little tricky)
https://code.sololearn.com/cWn0enVj2XEw/?ref=app
+ 5
https://code.sololearn.com/cO7QMxc8JciO/?ref=app
+ 5
One line for two problems
https://code.sololearn.com/c3fdP9Yg2e5p/?ref=app
+ 4
Nice one Danijel!