Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Problem Statement - 5

• Find the number of pairs whose sum is divisible by 7


• Constraints
1 <= N <= 10^5
0 <= arr[i] <= 10^9

Input 1: Input 2: Input 3:


5 4 6
1 6 2 5 13 8 14 43 20 1 7 6 21 15 14
Output 1: Output 2: Output 3:
3 2 5
Explanation : Explanation : Explanation :
(1, 6) == (6, 1) (8, 20) == (20, 8) (7, 14) == (14, 7)
(2, 5) == (5, 2) (20, 43) == (43, 20) (7, 21) == (21, 7)
(1, 13) == (13, 1) (14, 21) == (21, 14)
(1, 6) == (6, 1)
(6, 15) = (15, 6)
Deva Kushal

You might also like