You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
413 B

import numpy as np
file = "inputs/day6.input"
numbers = [int(x) for x in open(file, "rb").read().decode().split(",")]
days = 80
current_day = numbers
for day in range(days):
next_day = []
for fish in current_day:
if fish == 0:
next_day.append(6)
next_day.append(8)
else:
next_day.append(fish - 1)
current_day = next_day
print(len(current_day))