[Jprogramming] Another Quora problem
'Mike Day' via Programming
programming at jsoftware.com
Tue Dec 19 19:16:04 UTC 2017
q:24 60
2 2 2 3
2 2 3 5
So we can see that odd multiples of 60 are not divisible by 24, while
even ones are.
1000 >.@% 60
17
shows that there are 16 multiples of 60, <: 1000 and greater than zero.
8 of these are even, divisible by 24, and 8 odd, not divisible by 24 .
60*1+2*i.8
60 180 300 420 540 660 780 900
Does that help?
Mike
On 19/12/2017 18:52, 'Skip Cave' via Programming wrote:
> How many numbers from 1 to 1000 are divisible by 60 but not by 24?
>
> Here's my somewhat inelegant explicit solution:
>
> #e=.c#~d=.-.0=24|/c=.a#~b=.0=60|/a=.1+i.1000
>
> 8
>
>
> NB. What are the numbers?
>
> e
>
> 60 180 300 420 540 660 780 900
>
>
> How would I construct a more compact tacit solution?
>
>
> Skip
>
> Skip Cave
> Cave Consulting LLC
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the Programming
mailing list