For this Question: Alice has an array A of length N consisting of integers. The elements of the array may be positive, negative or zero. Further, Alice has a special integer K and she can choose any subarray of A and make all its elements equal to K. In other words, Alice can choose two integers i and j such that 1 ≤ i ≤ j ≤ N, and make A[i] = A[i + 1] = ... = A[j] = K.

Note that Alice can do this operation at most once, and possibly not do it at all. Find the maximum possible sum of the array.The first line consists of two space-separated integers N and K.
The second line consists of N space-separated integers – A[1], A[2], ... A[N].

<b>Constraints:</b>
1 ≤ N ≤ 1000
-1000 ≤ K ≤ 1000
-1000 ≤ A[i] ≤ 1000Print a single integer denoting the maximum possible sum of the array after the operation.Sample Input 1:
3 1
-1 5 -2

Sample Output 1:
5

Sample Explanation 1:
It is optimal to assign the subarray [3, 3]. The sum then becomes -1 + 5 + 1 = 5.

Sample Input 2:
3 0
-1 -2 3

Sample Output 2:
3

Sample Explanation 2:
It is optimal to assign the subarray [1, 2]. The sum then becomes 0 + 0 + 3 = 3.

Sample Input 3:
2 0
2 4

Sample Output 3:
6

Sample Explanation 3:
It is optimal to not assign any subarrays., I have written this Solution Code: N, K = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]

initialsum = sum(arr)
maxtamp = 0
temp = 0
for i in range(N):
    temp += (K - arr[i])
    maxtamp = max(maxtamp, temp)
    if temp < 0:
        temp = 0

print(initialsum + maxtamp), In this Programming Language: Python, Now tell me if this Code is compilable or not?