[Jprogramming] Another Quora problem

'Skip Cave' via Programming programming at jsoftware.com
Tue Dec 19 22:12:49 UTC 2017


Jimmy's solution is nice, and fast as well. It answers the question that
was posed, but I usually like to list the resulting numbers, just as a
check.

Of course, it's easy to get the resulting numbers using Jimmy's approach
(which is also faster than the bulk elimination approach.)

     a#~*24|a=.60*i.>:<.1000%60
60 180 300 420 540 660 780 900

Skip


Skip Cave
Cave Consulting LLC

On Tue, Dec 19, 2017 at 3:35 PM, Jimmy Gauvin <jimmy.gauvin at gmail.com>
wrote:

> ​​Explicit (and faster for larger range) :
>
>    +/*24|60*i.>:<.1000%60
> 8
>
> In this specific case is tacit necessary? useful?
>
>
>
> On Tue, Dec 19, 2017 at 1:52 PM, 'Skip Cave' via Programming <
> programming at jsoftware.com> wrote:
>
> > How many numbers from 1 to 1000 are divisible by 60 but not by 24?
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


More information about the Programming mailing list