-->
当前位置:首页 > 题库

PROGRAMMING:Prime pair conjecture

Luz5年前 (2021-05-10)题库405
Let's define $$d_ N $$is: $$d_ n = p_{ n+1}-p_ N $$, where $$p_ I $$is the $$I $$th prime. Obviously there is $$d_ 1 = 1 $$, and for $$n > 1 $$, $$d_ N $$is even“ The prime pair conjecture holds that there are infinite pairs of adjacent prime numbers with difference of 2.
Now, given any positive integer 'n' ($$< 10 ^ 5 $$), please calculate the number of prime pairs satisfying the conjecture no more than 'n'.
###Input format:
Enter a positive integer 'n' on one line.
###Output format:
Output the number of pairs of prime numbers satisfying the conjecture in a row that does not exceed 'n'.
###Input example:
```in
twenty
```
###Output example:
```out
four
```






answer:If there is no answer, please comment