aoc2021/d06/d06_1.py

8 lines
196 B
Python
Raw Permalink Normal View History

2021-12-08 00:52:34 +00:00
L=list(map(int,__import__("sys").stdin.read().split(",")))
for i in range(80):
L = [ (l-1) for l in L ]
n = sum( l < 0 for l in L)
L = [ l if l>=0 else 6 for l in L ]
L += [8]*n
print(len(L))