#100
r,y,g=map(int,input().split())
n=int(input())
a=[]
for i in range(n):
a.append(list(map(int,input().split())))
t=0
for i in range(n):
if a[i][0]==0:
t+=a[i][1]
if a[i][0]==1:
t += a[i][1]
if a[i][0]==2:
t += a[i][1]+r
if a[i][0]==3:
continue
print(t)
CSP小明上学python
最新推荐文章于 2024-08-13 08:28:10 发布