For this Question: Given an array containing N integers and an integer K. Your task is to find the length of the longest Sub-Array with sum of the elements equal to the given value K.The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. The first line of each test case contains two integers N and K and the second line contains N space-separated elements of the array.

Constraints:-
1<=T<=500
1<=N,K<=10^5
-10^5<=A[i]<=10^5

Sum of N over all test cases does not exceed 10^5For each test case, print the required length of the longest Sub-Array in a new line. If no such sub-array can be formed print 0.Sample Input:
3
6 15
10 5 2 7 1 9
6 -5
-5 8 -14 2 4 12
3 6
-1 2 3

Sample Output:
4
5
0, I have written this Solution Code: def lenOfLongSubarr(arr, N, K):


	mydict = dict()

	sum = 0
	maxLen = 0

	for i in range(N):

	
		sum += arr[i]

	
		if (sum == K):
			maxLen = i + 1


		elif (sum - K) in mydict:
			maxLen = max(maxLen, i - mydict[sum - K])

	
		if sum not in mydict:
			mydict[sum] = i

	return maxLen


if __name__ == '__main__':
	T = int(input())
	#N,K=list(map(int,input().split()))
	for i in range(T):

		N,k= [int(N)for N in input("").split()]
		arr=list(map(int,input().split()))
		N = len(arr)
		print(lenOfLongSubarr(arr, N, k)), In this Programming Language: Python, Now tell me if this Code is compilable or not?