13 lines
182 B
Python
13 lines
182 B
Python
|
#!/usr/bin/env python
|
||
|
floor = 0
|
||
|
|
||
|
with open("inputd1.txt", "r") as f:
|
||
|
for input in f:
|
||
|
for c in input:
|
||
|
if c == "(":
|
||
|
floor += 1
|
||
|
elif c == ")":
|
||
|
floor -= 1
|
||
|
|
||
|
print(floor)
|