boj step 3 rework

This commit is contained in:
2024-02-19 12:41:28 +09:00
parent 2b9511b074
commit e39d555bd0
2 changed files with 5 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
X, N = int(input()), int(input())
mul = lambda x: x[0] * x[1]
print("Yes") if sum(mul(list(map(int, input().split()))) for _ in range(N)) == X else print("No")