Math, asked by sakthishanmugam476, 1 year ago

How to find smallest number with exactly n divisers?

Answers

Answered by Anonymous
0

It's simple enough to count the divisors of n, eg. in Python len([i for i in range(1,n+1) if n % i == 0]). This is O(n).

I tried brute force search and found the smallest number with 32 divisors is 840, but it's much too slow for the problem above. From the inequality count_divisors(n) <= n, the number is going to be massive.

Similar questions