adventofcode/2021/1/1.py

17 lines
273 B
Python
Raw Normal View History

2022-12-01 21:13:55 +01:00
#!/usr/bin/env python3
content = open('input', 'r').readlines()
depthInc = 0
lastDepth = 9999
for line in content:
depth = int(line.strip())
if depth > lastDepth:
depthInc += 1
lastDepth = depth
print(depthInc)
if __name__ == "__main__":
main()