백준문제풀이/반복문

25304

포비용 2022. 11. 26.
import sys
sys.stdin = open("input.txt","rt")

total = int(input())

cnt = int(input())
each_total = 0
for i in range(cnt):
    a,b = map(int, input().split())

    each_total += (a*b)

if each_total == total:
    print("Yes")

else:
    print("No")

'백준문제풀이 > 반복문' 카테고리의 다른 글

11021  (0) 2022.11.26
15552  (0) 2022.11.26
8393  (0) 2022.11.26
10950  (0) 2022.11.26
2739  (0) 2022.11.26

댓글