aoc/2020/05/05_oneliner.py
2020-12-10 17:11:17 -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")
]
)
)
)