Update day 10 solution
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -27,19 +27,18 @@ def part_1(input):
|
||||
|
||||
def part_2(input):
|
||||
result = 0
|
||||
lines = input.copy()
|
||||
scores = []
|
||||
for line in input:
|
||||
for line in input.copy():
|
||||
seen = []
|
||||
for c in line.rstrip():
|
||||
if c in o_chars:
|
||||
seen.append(c)
|
||||
elif o_chars.index(seen[-1]) != c_chars.index(c):
|
||||
lines.remove(line)
|
||||
input.remove(line)
|
||||
break
|
||||
else:
|
||||
del seen[-1]
|
||||
for line in lines:
|
||||
for line in input:
|
||||
seen = []
|
||||
for c in line.rstrip():
|
||||
if c in o_chars:
|
||||
|
||||
Reference in New Issue
Block a user