[25304] 영수증 | 파이썬 https://www.acmicpc.net/problem/25304 x = int(input())n = int(input())total = 0for i in range(n): cost, num = map(int, input().split()) total = total + cost*numif total == x: print("Yes")else: print("No") 백준 | Baekjoon 2024.06.03