JUDWA - The Twins
CodeChefOpen on judge ↗
Mia is fascinated by anything she considers to be a twin. She calls a pairs of positive integers, i and j, twins if: - They are both prime. A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself. - Their absolute difference is exactly equal to 2 (i.e., |j-i|=2). Given an inclusive interval of integers from n to m, can you help Lia find the number of pa
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