On Tue, Nov 24, 2009 at 5:48 PM, Raul Miller <[email protected]> wrote:
>>>   F. Which students touched both locker 100 and 120? What do you
>>> notice about their student numbers?"
>
>   /:~ */ |: 2 3 5 ^"1 pfx 1 + 3 1 1
> 1 2 3 4 5 6 8 10 12 15 20 24 30 40 60 120
>   /:~ */ |: 2 5 ^"1 pfx 1 + 2 2
> 1 2 4 5 10 20 25 50 100

You computed the students for locker 100 and 120 individually, but the
question was which students touched both lockers, that is, the
intersection of these sets.

   divisors =: ](]#~0=]|[)>:@:i.
   divisors 120
1 2 3 4 5 6 8 10 12 15 20 24 30 40 60 120
   divisors 100
1 2 4 5 10 20 25 50 100
   (divisors 120) (e.#[) (divisors 100)
1 2 4 5 10 20
   divisors 20
1 2 4 5 10 20

Ambrus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to