summaryrefslogtreecommitdiff
path: root/progs/a890.py
blob: 2e9a35a21921c78de693b9d6b4efb6b652a4924b (plain)
1
2
3
4
5
6
7
def get_pairs_count(arr, n, sum):
    count = 0 
    for i in range(0, n):
        for j in range(i + 1, n):
            if arr[i] + arr[j] == sum:
                count += 1
    return count