d1 + d2/2

This commit is contained in:
2023-06-16 19:21:56 +02:00
commit b4c1879c1b
4 changed files with 1030 additions and 0 deletions

14
2015/d1/main.py Normal file
View File

@ -0,0 +1,14 @@
count = 0
move = 0
with open("./input", "r") as f:
for c in f.read():
move += 1
if c == '(':
count = count + 1
elif c == ')':
count = count - 1
if count == -1:
break
print(count)
print(move)