Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
|
|
@ -0,0 +1,6 @@
|
|||
from itertools import imap
|
||||
|
||||
f = lambda x, y, z: x + max(y, z)
|
||||
g = lambda xs, ys: list(imap(f, ys, xs, xs[1:]))
|
||||
data = [map(int, row.split()) for row in open("triangle.txt")][::-1]
|
||||
print reduce(g, data)[0]
|
||||
Loading…
Add table
Add a link
Reference in a new issue