Problem 069

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
MaJJ
Posts: 49
Joined: Tue Oct 14, 2008 12:14 am

Problem 069

Post by MaJJ »

I have a code that works, but gets slow at big numbers becouse of GCD.
I don't see how to apply memoization or some handy break...

Any ideas how to get rid of GCD, please?
Image
Image
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 069

Post by daniel.is.fischer »

I don't want to give too much of a hint, but google might find one or two sources which explain how to calculate [phi](n) efficiently.
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
Post Reply