Submission #10

Details and source code

Back to submissions
IDTimeUserProblemLangVerdict
10Mar 22, 2025, 06:42 AMadminRSQ QueriespyRE 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])