PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000011. Phản ví dụ cho giả thuyết của PolandBall (PolandBall and Hypothesis)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Phản ví dụ cho giả thuyết của PolandBall (PolandBall and Hypothesis)
PolandBall and Hypothesis
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
PolandBall believes there is a positive integer for which is prime for every positive integer . Disprove the claim for the given by finding any allowed integer such that is not prime. Any valid answer is accepted, and the answer need not be minimal.
Input
One line containing integer .
Output
Print any integer with for which is not prime. A valid answer is guaranteed to exist.
Subtasks
- Subtask 1 (20 points): ; ; a valid answer exists.
- Subtask 2 (30 points): ; ; a valid answer exists.
- Subtask 3 (50 points): ; ; a valid answer exists.
Examples
Input
3
Output
1
Explanation
For , choosing gives , which is composite. The answer is in the required range.
Input
4
Output
2
Explanation
For , gives prime , but gives , which is composite. Thus 2 is a valid output.