백준 9325 얼마? [Python]

지구온난화·2023년 3월 15일
0

백준 브론즈

목록 보기
15/52

t = int(input())
for i in range(t):
    s = int(input())
    n = int(input())
    sum = 0
    for j in range(n):
        q, p = map(int, input().split())
        sum += (q*p)
    sum += s
    print(sum)

2023-03-15

0개의 댓글