Chandlers Beautiful Pairs
CodeChefOpen on judge ↗
Chandler being very good with numbers, found out about $beautiful$ $pairs$. A pair is said to be beautiful if the numbers of the pair are prime and the difference between them is odd. Chandler challenges Joey to solve a few queries. Given an array, $A$ of size $N$, consisting of prime numbers $A_1, A_2,....A_n$, find the total number of ways you could pick two numbers from the array which for
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