Problem 569

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
User avatar
mctrafik
Posts: 27
Joined: Thu Oct 06, 2011 5:42 am
Location: Los Angeles, California
Contact:

Problem 569

Post by mctrafik » Sun Sep 18, 2016 4:11 pm

I worked this out by hand, but I can't seem to verify
"from the 9th mountain, he can see three peaks, those of the 5th, 7th and 8th mountain"

If, the mountain peaks were on a grid, then their coordinates would be :
9 - (430, 30)
8 - (328, 26)
7 - (238, 22)
5 - (100, 16)

The slope from 9th peak to 5th peak is (30 - 16) / (430 - 100) = 0.04242424242
But 9th to 8th peak is (30 - 26) / (430 - 328) = 0.03921568627

This means that 8th peak is blocking the view for 5th.
Image
"Nothing in this world that's worth having comes easy"

User avatar
mpiotte
Administrator
Posts: 1914
Joined: Tue May 08, 2012 4:40 pm
Location: Montréal, Canada

Re: Problem 569

Post by mpiotte » Sun Sep 18, 2016 5:25 pm

mctrafik wrote:...
If, the mountain peaks were on a grid, then their coordinates would be :
9 - (430, 30)
...
I would double check this value if I were you.
Image

User avatar
mctrafik
Posts: 27
Joined: Thu Oct 06, 2011 5:42 am
Location: Los Angeles, California
Contact:

Re: Problem 569

Post by mctrafik » Sun Sep 18, 2016 6:25 pm

Ah yes. That one's off. Thank you. Funny thing is when making primes by hand... "49" isn't prime.
Image
"Nothing in this world that's worth having comes easy"

Post Reply