Question: 
Write a python function to count unequal element pairs from the given array.


Model's Code:
def count_Pairs(arr, n):
    count = 0
    for i in range(n):
        for j in range(i + 1, n):
            if arr[i] != arr[j]:
                count += 1
    return count



Sample Correct Code:
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; 


Asserts:
assert count_Pairs([1,2,1],3) == 2
assert count_Pairs([1,1,1,1],4) == 0
assert count_Pairs([1,2,3,4,5],5) == 10


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 564 of 974: 418/564 (74.11347517730496%): success