Files
advent-of-code/2021/01/part1
2022-01-09 17:50:50 +00:00

15 lines
241 B
Python
Executable File

#!/usr/bin/env python
last_depth = -1
count = 0
with open('input') as f:
for line in f:
depth = int(line)
if last_depth > 0 and last_depth < depth:
count = count +1
last_depth = depth
print(count)