Twin Primes
CodeChefOpen on judge ↗
For a number *N*, find count of occurance of *N* in twin primes. Two prime numbers *M* and *N* are said to be Twin Primes if *|M-N| = 2* **Input** First line contains *T* - Number of test cases Next *T* lines contains a number - *N* **Output** For every *N*, print count of occurance in new line **Constraint:** 1<=T <= 1000 2 <= N <= 100000 **Sample Input** 3 11 5
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start