[Python/2015] Move solutions into .py files
This commit is contained in:
parent
8c2be5fb77
commit
94dd3ae399
52 changed files with 996 additions and 3314 deletions
9
Python/2015/01.py
Normal file
9
Python/2015/01.py
Normal file
|
@ -0,0 +1,9 @@
|
|||
from lib import *
|
||||
|
||||
input = read_input(2015, 1)
|
||||
|
||||
x = 0
|
||||
cum = [(x := x + [-1, 1][c == "("]) for c in input]
|
||||
|
||||
print(cum[-1])
|
||||
print(cum.index(-1) + 1)
|
Loading…
Add table
Add a link
Reference in a new issue