+ 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?
24 odpowiedzi
+ 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! ☺ Looking forward to this one
+ 4
Tries to find amicable numbers:
https://code.sololearn.com/c5AB0jkRMup1/?ref=app
+ 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.
+ 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
+ 4
Check out my try in Kotlin =
It creates Amicable, N - Amicable Numbers in a range.
https://code.sololearn.com/cjxf5eqWbzz2/?ref=app
+ 3
Input + One liner..😀😉
// Enter two numbers separated by space..
https://code.sololearn.com/cdvrZDum4MAN/?ref=app