+ 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.
28 Answers
+ 19
Here's Java 😉
https://code.sololearn.com/c8TRF4mTYL6r/?ref=app
+ 20
yes,its multiplication ☺
+ 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 😂
+ 18
here comes the java version by LukaArToDo 😃
+ 9
+ 6
python with recursion
Gaurav: made some beauriful headache thank yoz
https://code.sololearn.com/cYmJKyfWH42V/?ref=app
+ 5
I think it multiplication!
+ 5
Fixed and onelined. Works for large n like 362880 or 47900160
https://code.sololearn.com/c0O39y8R2H9O/?ref=app
+ 5
the lowest devisor cant be higher than Nth root of num.
+ 4
JS
Work with large Number
https://code.sololearn.com/WK55BH2cK7k5
+ 3
Python
https://code.sololearn.com/cY43dyX3Jhtj/#py
Simple, understandable
+ 3
@Murillo Pyaia
@Serge Gerodes
I tried your code on the playground and it does not work. Did I wrongly put my input?
+ 3
Remember Math friends ?How about combinations+ permutations..!😉
https://code.sololearn.com/cjeLCCw54Iil/?ref=app
+ 2
which operators should we use
+ 2
Here is my trial with python
https://code.sololearn.com/c9GYA49a6HH9/#py
+ 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).
+ 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
+ 1
https://code.sololearn.com/c4Pa6s9SuUdw/?ref=app
+ 1
dividers