PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#SP0000183. Lona và số nguyên tố
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Lona và số nguyên tố
Lona and Prime Numbers
Source: VNOJ bedao_r17_b
Version: Phuoc Hung OJ Extended (one dataset per execution; batched queries remain together).
Problem Statement
Given a positive integer , count integers of the form for distinct primes . Swapping and does not create a different .
Input
One positive integer .
Output
Print the number of valid integers .
Subtasks
- Subtask 1 (50 points): .
- Subtask 2 (50 points): .
Sample Input
1000
Sample Output
2
Sample Explanation
The valid integers are and .