sensible monkey format
This commit is contained in:
parent
92f555437a
commit
05cb9345a1
|
@ -4,6 +4,7 @@ from useful import *
|
||||||
def monkey(p):
|
def monkey(p):
|
||||||
ls = p.strip().split('\n')
|
ls = p.strip().split('\n')
|
||||||
op = ls[2].strip().split()[4]
|
op = ls[2].strip().split()[4]
|
||||||
return op, [numbers(l) for l in ls[1:]]
|
return [op, *[numbers(l) for l in ls[1:3]], *[numbers(l)[0] for l in ls[3:]]]
|
||||||
|
|
||||||
print(monkey(pgphs(open(0).read())[0]))
|
ms = [monkey(p) for p in pgphs(open(0).read())]
|
||||||
|
ic(ms)
|
||||||
|
|
Loading…
Reference in New Issue