This commit is contained in:
2021-12-06 07:37:45 -05:00
commit 6bff0ee551
22 changed files with 5034 additions and 0 deletions

38
Day1_1/main.py Normal file
View File

@@ -0,0 +1,38 @@
from aocd import get_data
from aocd import submit
input_data = get_data(day=1, year=2021)
test_data = """199
200
208
210
200
207
240
269
260
263"""
lines = input_data.split("\n")
count = 0
down_count = 0
for index, value in enumerate(lines):
# if index != 0:
if int(value) > int(lines[index - 1]):
print(str(index)+ ": " + str(value) + " + "+ str(lines[index - 1]))
# print("1")
count += 1
else:
print(str(index)+ ": " + str(value) + " < "+ str(lines[index - 1]))
# print("0")
down_count += 1
print("Input length:" + str(len(lines)))
print(count)
print(down_count)
#submit(count)