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