17 lines
267 B
Python
17 lines
267 B
Python
#!/usr/bin/env python
|
|
|
|
prev = None
|
|
inc = 0
|
|
|
|
with open("input01.txt", "r") as f:
|
|
for line in f:
|
|
num = int(line)
|
|
if prev is None:
|
|
prev = num
|
|
continue
|
|
if prev < num:
|
|
inc += 1
|
|
prev = num
|
|
|
|
print(inc)
|