Submission #12
Details and source code
| ID | Time | User | Problem | Lang | Verdict |
|---|---|---|---|---|---|
| 12 | Mar 22, 2025, 06:45 AM | admin | RSQ Queries | py | TLE 3 |
Source Code
pyn = 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]))