2025 #5

Open
aey wants to merge 16 commits from 2025 into main
Showing only changes of commit 11137463c7 - Show all commits

View file

@ -0,0 +1,26 @@
from output import ints
def solve(data):
p1 = 0
data = data.split("\n\n")
Q = data.pop().splitlines()
for q in Q:
W, H, *C = ints(q)
if W * H >= sum(C) * 9:
p1 += 1
p2 = "God jul!"
return p1, p2
if __name__ == "__main__":
with open("./input/12.txt", "r") as f:
inp = f.read().strip()
p1, p2 = solve(inp)
print(p1)
print(p2)
assert p1 == 440
assert p2 == "God jul!"