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

17 lines
273 B
Python

2 years ago
#!/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()