반응형
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")
반응형
'백준 | Baekjoon' 카테고리의 다른 글
[백준][11022] A+B - 8 | 파이썬 (0) | 2024.06.05 |
---|---|
[백준][11021] A+B-7 | 파이썬 (0) | 2024.06.04 |
[25314] 코딩은 체육과목 입니다 | 파이썬 (0) | 2024.06.03 |
[백준][2525] 오븐 시계 | 파이썬 (0) | 2024.05.27 |
[백준][2884] 알람 시계 | 파이썬 (0) | 2024.05.27 |