Hi guys,

I've been trying to solve this problem but it does work. Plz, help me with it's algorithm...

------------------------------------------------------------------------------

A pair of numbers is said to be amicable if the sum of some divisors of each of the numbers (excluding the number itself) is equal to the other number. For e.g., the numbers 1184 and 1210 are amicable since :

The divisors of 1184 are 592, 296, 148, 74, 37, 32, 16, 8, 4, 2, 1 whose sum is 1210

The divisors of 1210 are 605, 242, 121, 110, 55, 22, 11, 10, 5, 2, 1 whose sum is 1184

Plz note that all possible divisors may not b considered for making up the sum. FOR E.G. in the case of 12 & 16, the divisors of 12 are 1,2,3,4,6 whose sum is 16. Moreover the divisors of 16 are 1,2,4,8 of which the sum of 4 and 8 alone gives 12 (1,2 need not be considered). Hence amicability b/w two numbers exists if any m divisors out of the possible n divisors add up to the other number (in each case)..

--------------------------

I know this is a bit big....But, any try would be highly appreciated....Thanx a whole lot in advance...