Programming/Python & Data Structures
[Baekjoon/Python3] 9325번 얼마?
HooNeee
2020. 12. 5. 22:13
[Baekjoon/Python3] 9325번 얼마?
9325번: 얼마?
해빈이는 학교를 다니면서 틈틈히 번 돈으로 자동차를 사려고 한다. 자동차에 여러 가지 옵션을 포함시킬 수 있는데 해빈이는 덧셈과 곱셈을 하지 못하기 때문에 친구 태완이에게 도움을 청했
www.acmicpc.net
t = int(input())
for i in range(t):
op_price = 0
price = int(input())
option = int(input())
for j in range(option):
a, b = map(int, input().split())
op_price += a * b
print(price + op_price)