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 <[email protected]>
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 <
> [email protected]> 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
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm