For this Question: Given an array of integers, and an integer ‘K’, find the count of pairs of elements in the array whose sum is equal to 'K'.The first line of the input contains 2 space separated integers N and K denoting the size of array and the sum respectively.
The second line of the input contains N space separated integers denoting the elements of the array.

Constraints:
1 <= N <= 100000
1 <= K <= 100000
1 <= A[i] <= 100000Print the count of pairs of elements in the array whose sum is equal to the K.Sample Input:
4 6
1 5 7 1

Sample Output:
2, I have written this Solution Code: n,k=input().split()
n=int(n)
k=int(k)
arr=input().split()
for i in range(0,n):
    arr[i]=int(arr[i])
x=[0]*100000
for i in range(0,n):
    x[arr[i]]+=1
count=0
for i in range(0,n):
    count+=x[k-arr[i]]
    if((k-arr[i])==arr[i]):
        count-=1
    
print (int(count/2)), In this Programming Language: Python, Now tell me if this Code is compilable or not?