aoc/05/05_oneliner.py
2020-12-06 22:39:00 -06:00

20 lines
234 B
Python

print(
(
lambda l: (
max(l),
*(
a+1
for a, b in zip(l[:-1], l[1:])
if a == b-2
)
)
)
(
sorted(
[
int(line.translate(str.maketrans("FBLR","0101")),2)
for line in open("input.txt")
]
)
)
)