The calculation of n was off by 1, and the correction is as follows: a=: 215 275 335 355 420 580 n=: 1 + <.1505 % a b=: 1505 = ((#: i.@(*/)) n) +/ .* a n #: I. b 1 0 0 2 0 1 7 0 0 0 0 0 (n #: I. b) +/ .* a 1505 1505
----- Original Message ----- From: Roger Hui <[EMAIL PROTECTED]> Date: Friday, December 21, 2007 13:43 Subject: Re: [Jprogramming] Not so hard to solve the comic in J? To: Programming forum <[email protected]> > a=: 215 275 335 355 420 580 > n=: <.1505 % a > b=: 1505 = ((#: i.@(*/)) n) +/ .* a > n #: I. b > 1 0 0 2 0 1 > 1 0 0 2 0 1 +/ .* a > 1505 > > > > ----- Original Message ----- > From: Devon McCormick <[EMAIL PROTECTED]> > Date: Friday, December 21, 2007 13:32 > Subject: [Jprogramming] Not so hard to solve the comic in J? > To: J-programming forum <[email protected]> > > > How hard is it to solve this problem? http://xkcd.com/287/ > ----------------------------------------------------------------- > ----- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
