백준 | Baekjoon
[25304] 영수증 | 파이썬
sungkshon
2024. 6. 3. 03:43
반응형
https://www.acmicpc.net/problem/25304
x = int(input())
n = int(input())
total = 0
for i in range(n):
cost, num = map(int, input().split())
total = total + cost*num
if total == x:
print("Yes")
else:
print("No")
반응형