Twin Prime Pairs
Count the twin prime pairs (p, p+2) with both members ≤ N.
Input: one integer N.
Output: the number of twin prime pairs with p+2 ≤ N.
Constraints:
- 1 ≤ N ≤ 106
Sample Tests
Input 1
13
Output 1
3
Input 2
4
Output 2
0
Discussion (opens after you solve — no spoilers before)
No comments yet.