Problems
Contests
Account
Problems
> Twin Prime Pairs > Editorial
Twin Prime Pairs — Solution & Editorial
Back to the Problem
Sieve once, then count p with both p and p+2 prime.
Complexity:
O(N log log N)
×
Refer Job