[algogeeks] A problem asked in a contest

2011-08-15 Thread cegprakash
given the sum and product of n numbers we have to find those numbers(any one possibility) sum, product and n are inputs... for example if the sum is 10, product is 36 and n is 3 then 3,3,4 is a possible solution... if it is impossible we should print NO i wrote this code.. is there any faster

[algogeeks] A problem asked in a contest

2011-08-15 Thread Prakash D
given the sum and product of n numbers we have to find those numbers(any one possibility) sum, product and n are inputs... for example if the sum is 10, product is 36 and n is 3 then 3,3,4 is a possible solution... if it is impossible we should print NO i wrote this code.. is there any faster