Printn't
This commit is contained in:
parent
4d5c4e86c6
commit
9e7415833c
1 changed files with 0 additions and 3 deletions
3
day19.py
3
day19.py
|
@ -1,4 +1,3 @@
|
||||||
from pprint import pprint
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def part1(workflows: dict[str, list[list[str]]], ratings: str) -> int:
|
def part1(workflows: dict[str, list[list[str]]], ratings: str) -> int:
|
||||||
|
@ -10,7 +9,6 @@ def part1(workflows: dict[str, list[list[str]]], ratings: str) -> int:
|
||||||
|
|
||||||
workflow = "in"
|
workflow = "in"
|
||||||
while workflow not in "RA":
|
while workflow not in "RA":
|
||||||
print(workflow)
|
|
||||||
for rule in workflows[workflow]:
|
for rule in workflows[workflow]:
|
||||||
match rule:
|
match rule:
|
||||||
case [target]:
|
case [target]:
|
||||||
|
@ -34,7 +32,6 @@ def part2(workflows: dict[str, list[list[str]]]) -> int:
|
||||||
(workflow, x, m, a, s) = stack.pop()
|
(workflow, x, m, a, s) = stack.pop()
|
||||||
|
|
||||||
if workflow == "A":
|
if workflow == "A":
|
||||||
print(x, m, a, s)
|
|
||||||
result += (x[1] - x[0]) * (m[1] - m[0]) * (a[1] - a[0]) * (s[1] - s[0])
|
result += (x[1] - x[0]) * (m[1] - m[0]) * (a[1] - a[0]) * (s[1] - s[0])
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue