Advent-of-Code/2021/1/main.py
2021-12-02 11:18:42 -05:00

22 lines
421 B
Python

increment = 0
decrement = 0
same = 0
with open('input', 'r') as fp:
last = int(fp.readline())
for line in fp:
amt = int(line)
if(amt > last):
increment = increment + 1
elif(amt < last):
decrement = decrement + 1
else:
same = same + 1
last = amt
print "Increased: ", increment
print "Decreased: ", decrement
print " Remained: ", same