import sys class Solution: def sumEvenAfterQueries(self, A: 'List[int]', queries: 'List[List[int]]') -> 'List[int]': result = list() len0 = len(A) len1 = len(queries) len2 = len(queries[0]) sums = sys.maxsize for i in range(len1): #print(i) val = que…