My second approach was brute force like you did. It gave the same number as
my first approach. And interestingly it was faster than my first approach.
Happens sometimes. The only thing I can think of is that I found the answer
but I didn't supply what they wanted. I supplied the first number that had
as a permutation of the digits given sorted by (%totient)n . I cheated.
Stole totient from J phrases.

The only thing I can think of is that they wanted something other than the
n that I found.

On Tue, Mar 14, 2017 at 8:12 PM, 'Jon Hough' via Programming <
[email protected]> wrote:

> I just tried it and got the right answer. But my approach is essentially
> brute force:
> I basically stringified  (":) the totient result, sorted it, and compared
> to the sorted stringified original number.
>
> I can be more specific if you like.
>
> Regards,
> Jon
> --------------------------------------------
> On Wed, 3/15/17, Don Guinn <[email protected]> wrote:
>
>  Subject: [Jprogramming] Project Euler
>  To: "Programming forum" <[email protected]>
>  Date: Wednesday, March 15, 2017, 9:37 AM
>
>  Has anyone out there solved problem
>  70? I have worked it two ways which
>  give the same answer but it is given as incorrect. I don't
>  want to divulge
>  what I did as that is against their rules. I must be missing
>  something and
>  presenting the wrong number for the result. Or is it
>  possible that their
>  answer is wrong?
>
>  Glad to discuss it in the forum, but if anyone wants to
>  contact me
>  privately so we don't break Project Euler rules, contact me
>  at
>  [email protected]
>
>  Thanks.
>  ----------------------------------------------------------------------
>  For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> 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