d1 + d2/2
This commit is contained in:
14
2015/d1/main.py
Normal file
14
2015/d1/main.py
Normal 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)
|
||||
|
Reference in New Issue
Block a user