2015 challenge 1 complete
This commit is contained in:
parent
b4f1b72dcb
commit
6a7a4df57f
1
2015/1/input.txt
Normal file
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
9
2015/1/solution.py
Normal 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)
|
Loading…
Reference in a new issue