mirror of
https://github.com/ershisan99/advent-of-code.git
synced 2025-12-16 12:32:49 +00:00
9 lines
172 B
Python
9 lines
172 B
Python
input = open("input.txt").read()
|
|
count = 0
|
|
for i, char in enumerate(list(input), start=1):
|
|
if char == "(":
|
|
count += 1
|
|
else:
|
|
count -= 1
|
|
print(count)
|