You need a different approach.

Project Euler deprecates giving out answers, but here's the approach:

Read in the data and format it into a list of boxes containing lines. A test version is

   ]pyramid =: 3;7 4;2 4 6;8 5 9 3
+-+---+-----+-------+
|3|7 4|2 4 6|8 5 9 3|
+-+---+-----+-------+

  Then process the lines from the bottom up to get the answer:

   combinerows&.>/ pyramid
+--+
|23|
+--+

All you have to do is write combinerows. Don't be daunted: my version is just 10 characters long.

Henry Rich


On 1/7/2015 5:56 AM, oventarb oventarb wrote:

Dear Roger Hui!
How can rewrite your program for problem 67?
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to