I am new to python, I am giving two numbers,
a = 2
b = 9
a and b
are inclusive range i.e; (2,3,..,9)
. and my expectation for highest number of divisors are 6 and 8
.
Solution Explanation:
4 = 2 * 2(one factor)
6 = 2 * 3(two factor)
8 = 2 * 4(two factor)
9 = 3 * 3(one factor)
So, Need to Choose highest number of factors.
How to list the highest number of divisors in python from above logic ?.
Ex:
If I give the range (1,2,..,10)
. Then it should gave the result of highest number of divisors are 6,8 and 10
.
and so on..