4 kyu
The smallest number with a given number of divisors
122 of 151user8729270
Description:
You have a natural number d
.
You need to write a function f(d)
which finds the smallest positive number n
having d
divisors .
For example:
f(1) = 1
f(3) = 4
f(60) = 5040
f(420) = 9979200
In this kata all the tests will be with 1 <= d <= 10000
Keep in mind that n
can be on the order of , so iterating over n
and finding the divisors in total for operations is not an option.
Good luck!
Mathematics
Recursion
Algorithms
Number Theory
Performance
Similar Kata:
Stats:
Created | Dec 3, 2022 |
Published | Dec 3, 2022 |
Warriors Trained | 1802 |
Total Skips | 81 |
Total Code Submissions | 5434 |
Total Times Completed | 151 |
Python Completions | 122 |
C# Completions | 9 |
JavaScript Completions | 27 |
Total Stars | 109 |
% of votes with a positive feedback rating | 97% of 33 |
Total "Very Satisfied" Votes | 31 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 0 |
Total Rank Assessments | 5 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 5 kyu |