"Short Cube"
Write a program that, given a natural number k, determines the smallest natural number whose cube is divisible by k.
Input
A single natural number, k.
Output
Output the smallest natural number (a strictly positive integer) whose cube is divisible by k without leaving a remainder.
Example
For instance, neither 1^3
= 1, 2^3
= 8, 3^3
= 27, 4^3
= 64, nor 5^3
= 125 are divisible by 12 without a remainder. However, 6^3
= 216 is divisible by 12. Therefore, 6 is the smallest natural number whose cube is a multiple of 12.
Evaluation Criteria
20% of the points are awarded for tests where 2 ≤ k ≤ 100.
Another 20% of the points are for
10^5
≤ k ≤10^6
.Another 20% of the points are for
10^7
≤ k ≤10^8
.Another 20% of the points are for
10^10
≤ k ≤10^12
.The remaining 20% of the points are for
10^15
≤ k ≤10^18
.