Problem 406

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
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Problem 406

Post by thundre »

I have implemented a concise and fast algorithm that I believe should give me the right answers, yet I keep getting the red X when I paste it in and round it.

It works correctly on all the examples. However, the examples given have some limitations: Low n, and also a low b/a ratio when compared with some of the cases required for the sum.

Can someone verify this?
C(1234567890123,sqrt(31),sqrt(654321)) =~ 6210.365869341323

I hope 2.5 weeks isn't too early to beg for this kind of help.
Image
sivakd
Posts: 217
Joined: Fri Jul 17, 2009 9:37 am
Location: California, USA
Contact:

Re: Problem 406

Post by sivakd »

I get 5642.45390433266
Image
puzzle is a euphemism for lack of clarity
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 406

Post by thundre »

Thanks. I'm clearly missing the optimal strategy somehow, as opposed to more mundane problems like roundoff error or interpreting the summation incorrectly. I must re-examine my logic.

edit: Solved it! I was leaving out a certain type of strategy which did not apply to the given examples.

Thanks again.
Image
Post Reply