aoc2022/d11/sample1.py

25 lines
433 B
Python
Raw Permalink Normal View History

2022-12-11 13:04:43 +00:00
from collections import deque
M = [
[
deque([ 79, 98 ])
, lambda old: old * 19
, lambda x: 3 if divmod(x,23)[1] else 2
,0
],[
deque([ 54, 65, 75, 74 ])
, lambda old: old + 6
, lambda x: 0 if divmod(x,19)[1] else 2
,0
],[
deque([ 79, 60, 97 ])
, lambda old: old * old
, lambda x: 3 if divmod(x,13)[1] else 1
,0
],[
deque([ 74 ])
, lambda old: old + 3
, lambda x: 1 if divmod(x,17)[1] else 0
,0
]
]