2015 challenge 1 complete

This commit is contained in:
Tristan 2018-11-29 16:48:25 +00:00
parent b4f1b72dcb
commit 6a7a4df57f
2 changed files with 10 additions and 0 deletions

1
2015/1/input.txt Normal file

File diff suppressed because one or more lines are too long

9
2015/1/solution.py Normal file
View file

@ -0,0 +1,9 @@
with open('input.txt', 'r') as input:
counter = 0
text = input.readline()
for char in text :
if char == ')':
counter -= 1
elif char == '(':
counter += 1
print (counter)