arr = [6,7,7,41,5,3,1,3]
# arr = [1,2,3,4,5]
n = 3
def MaxSubarraySum(arr, n) -> int:
tempSum, maxSum = 0,0
length = len(arr)
for i in range(length):
tempSum += arr[i]
if i >= n-1:
maxSum = max(tempSum, maxSum)
tempSum -= arr[i - (n-1)]
print(maxSum)
MaxSubarraySum(arr,n)