Anonymous user
Maximum triangle path sum: Difference between revisions
Better task description.
(+ second Python entry) |
(Better task description.) |
||
Line 30:
06 71 28 75 94 48 37 10 23 51 06 48 53 18 74 98 15
27 02 92 23 08 71 76 84 15 52 92 63 81 10 44 10 69 93</pre>
Such numbers can be included in the solution code, or read from a "triangle.txt" file.
This task is derived from the [http://projecteuler.net/problem=18 Euler Problem #18].
=={{header|D}}==
<lang d>void main() {
import std.stdio, std.algorithm, std.range, std.file, std.conv;
Line 49:
=={{header|Haskell}}==
<lang haskell>parse = map (map read . words) . lines
f x y z = x + max y z
|