int n : 배열 ar 의 길이
int k : the integer divisor
int array ar : 정수형 배열
The number of (i,j) pairs where i<j and ar[i] + ar[j] is divisible by k.
def divisibleSumPairs(n, k, ar):
result = 0
for i in range(n-1):
j = i+1
while j < n:
if ((ar[i] + ar[j]) % k) == 0:
result += 1
j += 1
return result