PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000115. Giả thuyết của Henry
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Giả thuyết của Henry
Henry's Conjecture
Source: LQDOJ primehenry (cross-checked via the HNCode mirror).
Version: Phước Hưng OJ Extended.
Problem Statement
Henry conjectures that there is a positive integer such that is prime for every positive integer . Given , produce a counterexample: any positive integer for which is not prime.
Multiple answers may be correct.
Input
One positive integer .
Output
Output one integer such that and is composite.
Subtask
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Example
Input
5
Output
3
Explanation
For , taking yields , which is composite.