P1128 [HNOI2001] Find the Positive Integer

Description

Given a positive integer $n$, find the smallest positive integer $m$ that has $n$ distinct divisors. For example: when $n=4$, $m=6$, because $6$ has $4$ distinct positive divisors $1, 2, 3, 6$, and it is the smallest integer that has $4$ divisors.

Input Format

The input contains exactly one line with a single integer representing $n$.

Output Format

Output a single line with one integer: the smallest positive integer $m$ that satisfies the condition.

Explanation/Hint

Constraints For $100\%$ of the testdata, it is guaranteed that $1 \leq n \leq 5 \times 10^4$. Translated by ChatGPT 5