+ 42

[ASSIGNMENT] ::: A.B.C.D.E.... = N

Find number of possible pairs of A,B,C ... such that A.B.C... = N //where N is the number entered //provided A,B,C ... ,N belongs to set of natural numbers(1,2,3....) example ::: input : 2 4 //product of any 2 variables = 4 , ie A.B=4 output : 3 //(1,4), (2,2), (4,1) //simple approach to the problem is welcome //happy coding & best of luck 👍 ☺ edit ::: abcde...k = n , (n+k-1)Ck , solutions for abcde..k belonging to natural no.

17th Jan 2018, 6:44 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
28 Answers
18th Jan 2018, 7:20 PM
LukArToDo
LukArToDo - avatar
+ 20
yes,its multiplication ☺
17th Jan 2018, 7:02 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 19
the code on which i commented are working ☺👍 //not checked anto74 code yet //showing no internet conn. for now 😕 //btw mostly all r python coders here 😂
18th Jan 2018, 6:03 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 18
here comes the java version by LukaArToDo 😃
18th Jan 2018, 7:40 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
19th Jan 2018, 11:53 PM
AZTECCO
AZTECCO - avatar
+ 6
python with recursion Gaurav: made some beauriful headache thank yoz https://code.sololearn.com/cYmJKyfWH42V/?ref=app
19th Jan 2018, 6:32 AM
Oma Falk
Oma Falk - avatar
+ 5
I think it multiplication!
17th Jan 2018, 6:55 PM
StoneCoder🇬🇦
StoneCoder🇬🇦 - avatar
+ 5
Fixed and onelined. Works for large n like 362880 or 47900160 https://code.sololearn.com/c0O39y8R2H9O/?ref=app
18th Jan 2018, 8:35 PM
VcC
VcC - avatar
+ 5
the lowest devisor cant be higher than Nth root of num.
19th Jan 2018, 6:36 AM
Oma Falk
Oma Falk - avatar
+ 4
JS Work with large Number https://code.sololearn.com/WK55BH2cK7k5
21st Jan 2018, 12:07 AM
StoneCoder🇬🇦
StoneCoder🇬🇦 - avatar
17th Jan 2018, 10:30 PM
Serge Gerodes
Serge Gerodes - avatar
+ 3
@Murillo Pyaia @Serge Gerodes I tried your code on the playground and it does not work. Did I wrongly put my input?
18th Jan 2018, 5:25 PM
Anto74
Anto74 - avatar
+ 3
Remember Math friends ?How about combinations+ permutations..!😉 https://code.sololearn.com/cjeLCCw54Iil/?ref=app
20th Jan 2018, 9:27 AM
Zoetic_Zeel
Zoetic_Zeel - avatar
+ 2
which operators should we use
17th Jan 2018, 6:53 PM
HRMtech
HRMtech - avatar
18th Jan 2018, 5:22 PM
Anto74
Anto74 - avatar
+ 2
@Anto74 the input must be entered as it goes in the challenge description. For example: input: 2 4 (first, a number, second, a space, last, a number) It should return the number of pairs of numbers which the products result in 4 as output (3 pairs).
18th Jan 2018, 5:44 PM
Murillo Pyaia Alves Paixão
Murillo Pyaia Alves Paixão - avatar
+ 1
Here is my try in python! 2 lines of code and 3 modules. Outside SoloLearn, I could get it to work with pairs resulting up to 2500. With trios and bigger groups, it won't work so fine :/ https://code.sololearn.com/cwUpsNXtguYx/?ref=app
17th Jan 2018, 10:05 PM
Murillo Pyaia Alves Paixão
Murillo Pyaia Alves Paixão - avatar
+ 1
https://code.sololearn.com/c4Pa6s9SuUdw/?ref=app
18th Jan 2018, 11:47 AM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
+ 1
dividers
18th Jan 2018, 1:51 PM
Roger C
Roger C - avatar