summaryrefslogtreecommitdiff
path: root/progs/a927.py
blob: 062abe09c1065c3fd9a62ec1431b21cda4a1358b (plain)
1
2
3
4
5
6
7
def count_Pairs(arr,n): 
    cnt = 0; 
    for i in range(n): 
        for j in range(i + 1,n): 
            if (arr[i] != arr[j]): 
                cnt += 1; 
    return cnt;