Số nguyên tố lớn nhất

View as PDF



Problem type
Points: 10 (p) Time limit: 1.0s Memory limit: 1G Input: stdin Output: stdout

Nhập vào 1 số nguyên dương \(n\). In ra số nguyên tố lớn nhất nhỏ hơn hoặc bằng \(n\).

Input

  • Gồm một dòng duy nhất chứa số nguyên dương \(n\) \((2 \leq n \leq 10^5)\).

Output

  • Gồm một dòng duy nhất chứa số nguyên tố lớn nhất nhỏ hơn hoặc bằng \(n\).

Example

Test 1
Input
6
Output
5

Comments

There are no comments at the moment.