Tasks 01-14

This commit is contained in:
2021-12-14 21:06:45 +03:00
parent d8eee6a69d
commit 1c9a6c0a96
29 changed files with 7033 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
with open("input") as f:
data = f.read().strip().split('\n')
data = [int(x) for x in data]
print(sum([1 for x,y in zip(data, data[1:]) if y-x>0]))
d2 = [a+b+c for a,b,c in zip(data, data[1:], data[2:])]
print(sum([1 for x,y in zip(d2, d2[1:]) if y-x>0]))
+2000
View File
File diff suppressed because it is too large Load Diff