BOJ25304 - 영수증

CYSSSSSSSSS·2023년 6월 18일

알고리즘

목록 보기
23/83

문제25304

문제

  • 지불한 금액과 영수증 금액이 맞으면 yes 를 출력 아니면 no 를 출력하시오.
price = int(input())

n = int(input())

sum_ = 0

for _ in range(n):
    p,count = map(int,input().split())
    sum_ += (p * count)

if price == sum_:
    print('Yes')
else:
    print('No')
profile
개발자 되고 싶어요

0개의 댓글