-
Do you know your divisibility rules?
Input
The only line of input contains an integer $2 \leq N \leq 10^{10^5}$.
Output
Output the smallest prime $p$ that is a divisor to $N$. $p \leq 20$ is guaranteed.
Scoring
Your solution will be tested on a set of test groups, each worth a number of points. Each test group contains a set of test cases. To get the points for a test group you need to solve all test cases in the test group.
Group
Point value
Constraints
$1$
$1$
$N \leq 10^5$
$2$
$10$
$p = 2$
$3$
$10$
$p = 3$
$4$
$10$
$p = 5$
$5$
$10$
$p = 7$
$6$
$10$
$p = 11$
$7$
$49$
No additional constraints.
Extra samples
Sample 4 can be downloaded here (too large to be uploaded to the website). The answer is 7.
Sample Input 1 Sample Output 1 9
3
Sample Input 2 Sample Output 2 30
2
Sample Input 3 Sample Output 3 5
5
-
To solve the problems, you can either start a virtual contest or register for regular practice. A virtual contest simulates a participation in the original contest with a duration of 02:00:00, while regular practice lets you submit solutions without any constraints.
You must log in to register. - A Accelerated Learning
- D Divisibility test
- E Easy Query
- F Fact Check
- G Open Wide
- H High Noon
- K You wouldn't kill a kitten
- M Make Kattis Happy
- P Problemhunt?
- S Solution Presentation