about summary refs log tree commit diff
path: root/aoc/2021/01/part-one.py
diff options
context:
space:
mode:
Diffstat (limited to 'aoc/2021/01/part-one.py')
-rw-r--r--aoc/2021/01/part-one.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/aoc/2021/01/part-one.py b/aoc/2021/01/part-one.py
new file mode 100644
index 0000000..db9a650
--- /dev/null
+++ b/aoc/2021/01/part-one.py
@@ -0,0 +1,6 @@
+from itertools import tee
+from sys import stdin
+
+old, new = tee(map(int, stdin.read().strip().split()))
+next(new)
+print(sum(o < n for o, n in zip(old, new)))