All submissions for this problem are available.
Guru V is very friendly and loves finding friendly objects. He wants to find something friendly in Mathematics and someone has told him about Amicable Numbers.
Amicable numbers are those pair of numbers for which the sum of divisors of one number is equal to the other number.
Guru V has come to you to help him devise a program for finding Amicable numbers.
The first line contains a number X whose amicable pair is to be found such that 1 <= X <= 5 x 10^5
The number which is the amicable pair of X. If no Amicable number is found for X, Print “N”.
1. 220 2. 10Output:
1. 284 2. N
|Time Limit:||0.134884 - 0.29 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.