#P10411. 「QFOI R2」树色尤含残雨
「QFOI R2」树色尤含残雨
Problem Description
Little R is a cute girl, and she likes prime factorization.
She has a positive integer . In each operation, you may choose such that are two different primes and are positive integers. If is divisible by , then divide by ; otherwise, the operation is invalid.
Please find the minimum possible value of that can be obtained after performing the operation some number of times.
Input Format
One line containing one integer .
Output Format
Output one integer, the minimum possible that can be obtained.
9
9
120
1
2310
2
Hint
Explanation for Sample
No valid operation can be performed.
Explanation for Sample
You can perform the following two operations:
- Let . Divide by , obtaining .
- Let . Divide by , obtaining .
Constraints
This problem uses bundled tests. You can only get the corresponding score if you pass all test points in a subtask and all subtasks it depends on.
For all data: .
- Subtask 1 ( points): .
- Subtask 2 ( points): is a "square-free number".
- Subtask 3 ( points): is a positive integer power of a prime.
- Subtask 4 ( points): . Depends on Subtask 1.
- Subtask 5 ( points): No special constraints. Depends on Subtasks 1, 2, 3, and 4.
A number is called a "square-free number" if and only if there does not exist an integer such that is divisible by .
Translated by ChatGPT 5