Couples
CodeChefOpen on judge ↗
Consider an array of n integers, A = [ a1, a2, a3, …. an ] Find and print the total number of (x,y) pairs such that ax * ay Input The first line contains an integer, t, denoting the number of test cases to follow. The second line contains an integer, n, denoting the number of elements in the array. The third line consists of n space-separated integers. Output Print a long integer denoting
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