티스토리 뷰
반응형
https://www.acmicpc.net/problem/25304
25304번: 영수증
준원이는 저번 주에 살면서 처음으로 코스트코를 가 봤다. 정말 멋졌다. 그런데, 몇 개 담지도 않았는데 수상하게 높은 금액이 나오는 것이다! 준원이는 영수증을 보면서 정확하게 계산된 것
www.acmicpc.net
total_calc = 0
total = int(input())
goods_count = int(input())
for i in range(goods_count):
p, c = input().split()
total_calc += int(p) * int(c)
if total == total_calc:
print("Yes")
else:
print("No")
'C, C++ > Baekjoon Online Judge' 카테고리의 다른 글
백준 boj 25314 코딩은 체육과목 입니다 python (0) | 2023.11.26 |
---|---|
백준 boj 10250 ACM 호텔 python (0) | 2023.11.26 |
Baekjoon 백준 11557 Yangjojang of The Year (0) | 2022.08.15 |
Baekjoon 백준 2747, 2748, 10870번 피보나치 수 (0) | 2022.04.25 |
Baekjoon 백준 2884번 알람 시계 (0) | 2022.04.24 |
댓글
티스토리 방명록
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
Blog is powered by
Tistory / Designed by
Tistory
Contact: j0n9m1n1@gmail.com
Contact: j0n9m1n1@gmail.com