#P11212. 『STA - R8』挑战 Goldbach 猜想
『STA - R8』挑战 Goldbach 猜想
Problem Description
There are queries. Each time, you are given a positive integer . Ask how many positive integers with satisfy that both and are prime numbers.
Input Format
The first line contains one positive integer .
The next lines each contain one positive integer .
Output Format
Output lines. Each line answers one query.
5
5
55
555
5555
55555
1
3
22
93
447
Hint
This problem uses bundled tests.
Constraints:
- Subtask 1 (30 pts): .
- Subtask 2 (70 pts): no special constraints.
For all testdata, .
Luogu code length limit: 50 KB.
Translated by ChatGPT 5