[백준/Python] 25304번 : 영수증
문제
https://www.acmicpc.net/problem/25304
반복문 연습용 문제
풀이
반복문을 만들어 각 항마다 a,b값을 곱한 뒤 모두 합쳐서 X의 값과 대조한다.
X = int(input())
N = int(input())
result = 0
for _ in range(N):
a, b = map(int, input().split(" "))
result += a * b
if result == X:
pr...
studio-pendant.hashnode.dev1 min read