1
2
3
4
5
6
|
n,q=map(int, input().split())
ans=[0]*(n+1)
for _ in range(q):
a,b,c=map(int,input().split())
if a==1: ans[b]+= c
elif a==2: print(sum(ans[b:c+1]))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
[백준] 13300 (0) | 2021.01.14 |
---|---|
[백준] 13163 (0) | 2021.01.14 |
[백준] 12813 (0) | 2021.01.13 |
[백준] 12780 (0) | 2021.01.13 |
[백준] 12605 (0) | 2021.01.13 |
댓글