AH - neat but wrong problem!  Sorry.
Now for breakfast
M

On 21/03/2021 09:16, 'Michael Day' via Programming wrote:
I see Raul & Bob have replied while I was abed.
SO,  before I look at their replies....

Not brute force,  but quite neat:
   <.^(10%3)*^.10
14

For a smaller problem, check with 4^4:
    +/(=<.)^&(%3)>:i.4^4

6


<.^(4%3)*^.4

6


QED?


Cheers,


Mike






On 21/03/2021 02:57, Skip Cave wrote:
How do you solve this problem using J (brute force)
n =. >: i. 1000
p =. n^n
How many p are perfect cubes?





--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

Reply via email to