Another way,

>./@(5 */\ 10&#.^:_1) 73167176531330624919225119674426574742355349194934x
6048





________________________________
From: "Sherlock, Ric" <[email protected]>
To: Programming forum <[email protected]>
Sent: Sun, December 6, 2009 5:01:45 PM
Subject: Re: [Jprogramming] Code review / Euler

> From: Lau B. Jensen
> 
> > You can use "each" (&.>)
> >
> > However currently the data in the boxes is character (not numeric) so
> you're going to have to
> > However it is probably neater to work directly with the groups of 5.
> >
> > Or even better still convert them back to integers before grouping:
> >    data=:  _&"."0 ":
> 73167176531330624919225119674426574742355349194934x
> >    5 */\  _"."0 ": data
> > 882 126 294 1764 1470
> 
> Thank you very much Mr. Sherlock - I really took away some insights
> from seeing how you approached that problem for several angles!

Note the redundant ( _&"."0 ": ) I should have removed from my code:
  5 */\ _&"."0 ": 73167176531330624919225119674426574742355349194934x
882 126 294 1764 1470 ...

----------------------------------------------------------------------
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