On Mon, Jun 8, 2009 at 10:39 AM, <[email protected]> wrote:
> I would not think it was simpler, but if the verb returned:
>
> 1 - "IS" perfect power
> 0 - "IS NOT" perfect power
>
> that would be fine.

Both Mike Day's and my own solutions work this way:

   pp0=: *./@(0&<@#, 2&<:, 1 < +./)@(#/....@q: ::0:"0)

   pp0 4
1
   pp0 5
0

FYI,

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

Reply via email to