I thought someone would be using %`+  after that long discussion we just had:

%/({:,+/)^:(3*4*5)[1 2 NB. Ben Gorte      
0.618034
   $":%/({:,+/)^:(3*4*5)[1 2 
8
   %/({:,+/)^:(3*5)1 NB. Ric Sherlock
0.618034
   $":%/({:,+/)^:(3*5)1
8
   %(+%)/15$1 NB. Rob Hodgkinson.
0.618034
   $":%(+%)/15$1
8
   NB. I don't tiink 15 and 23 are quite
   NB. in the spirit of the mystery.
   %/((+/ .*)~^:4)(1 2,:2 3)
0.618034 0.618034
   %/((+/ .*)~^:4)(1 2,:2 3)NB. David Lambert
0.618034 0.618034
   NB. Too much invormation
   2%1+%:5  NB. Peter B. Kessler     
0.618034
   $":2%1+%5
7
   %`+/(5*6)#1  NB. Linda Alvord
0.618034
   $":%`+/(5*6)#1
8

Linda

-----Original Message-----
From: Programming [mailto:[email protected]] On Behalf 
Of David Lambert
Sent: Thursday, February 25, 2016 7:34 AM
To: [email protected]
Subject: Re: [Jprogramming] Morning Mystery

    NB. without looking at the other solutions...
    NB. 25 characters---I made it twice!

    %/((+/ .*)~^:4)(1 2,:2 3)
0.618034 0.618034

    NB. I can squeeze that to 19 characters
    %/+/ .*~^:8>:2[\i.3
0.618034 0.618034

> Date: Thu, 25 Feb 2016 02:49:56 -0500
> From: "Linda A Alvord"<[email protected]> 
> To:<[email protected]>
> Subject: [Jprogramming] Morning Mystery
> Message-ID: <000001d16fa1$1f8ac160$5ea04420$@net>
> Content-Type: text/plain;     charset="us-ascii"
>
> Using only the single digit counting numbers:
>
>   
>
>     >:i.9
>
> 1 2 3 4 5 6 7 8 9
>
>   
>
> write the shortest possible expression to produce:
>
>   
>
> 0.618034
>
>   
>
> Linda

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

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

Reply via email to