Submission #11

Details and source code

Back to submissions
IDTimeUserProblemLangVerdict
11Mar 22, 2025, 06:43 AMadminRSQ QueriespyWA 1

Source Code

py
n = int(input())
a = list(map(int, input().split()))
q = int(input())
for _ in range(q):
    p, l, r = map(int, input().split())
    if p == 1:
        a[l - 1] = r
    else:
        print(sum(a[l-1:r-1]))