Problem 080

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.
User avatar
jaap
Posts: 559
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 080

Post by jaap »

3, 99 are correct.
5, 50 are wrong - 5 is actually relatively far off.
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Problem 080

Post by PurpleBlu3s »

jaap wrote:3, 99 are correct.
5, 50 are wrong - 5 is actually relatively far off.
I think I found the problem, is 474 correct for sqrt 5?
Image
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Problem 080

Post by PurpleBlu3s »

Nevermind, it must have been because I got the answer.
Image
User avatar
Francky
Posts: 90
Joined: Sat May 07, 2011 3:49 pm
Location: South of France

Re: Problem 080

Post by Francky »

PurpleBlu3s wrote:I think I found the problem, is 474 correct for sqrt 5?
It's better, but still false.
ImageEntia non sunt multiplicanda praeter necessitatem
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Problem 080

Post by PurpleBlu3s »

Francky wrote:
PurpleBlu3s wrote:I think I found the problem, is 474 correct for sqrt 5?
It's better, but still false.
Yes, 473. :>

It was an issue with rounding.
Image
cptroot
Posts: 3
Joined: Wed Oct 19, 2011 4:35 am

Problem 080

Post by cptroot »

So I have written an algorithm for problem 80, and I ended up with the wrong answer of 40909. What I don't get about this is that I have the correct sum for the square root of 2, and I also have the correct number for the square root of 99. Am I missing something? I sum without the perfect squares, and I include the first number for the digital sum. I can't see where my algorithm is going wrong, and yet the sum keeps getting rejected. Any suggestions?
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 80

Post by TripleM »

Here's the forum thread for problem 80: viewtopic.php?f=50&t=1198

I suspect you're making a mistake that has been mentioned in some posts there.
cptroot
Posts: 3
Joined: Wed Oct 19, 2011 4:35 am

Re: Problem 80

Post by cptroot »

I don't think I am. I know that my method, which is a binary go by digit, won't do rounding, and I went out super far to double check that. I am including the first digit, so that's not the problem either. I can't get why I would be getting the right number for sqrt(99), but not the right total sum.
Just to check, the digit sum for 99 is 446, right?
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Problem 80

Post by PurpleBlu3s »

cptroot wrote:I don't think I am. I know that my method, which is a binary go by digit, won't do rounding, and I went out super far to double check that. I am including the first digit, so that's not the problem either. I can't get why I would be getting the right number for sqrt(99), but not the right total sum.
Just to check, the digit sum for 99 is 446, right?
Yes, but you have to have every square root digital sum correct not just 2 and 99. Check if you are getting it right for other values - it's likely some are wrong.
Image
cptroot
Posts: 3
Joined: Wed Oct 19, 2011 4:35 am

Re: Problem 80

Post by cptroot »

Does anybody have a list of sums they could pm me? I'm interested in finding out the right answer, but I have no idea where my bug is, especially because it seems to be getting so much right.
User avatar
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

Re: Problem 80

Post by PurpleBlu3s »

cptroot wrote:Does anybody have a list of sums they could pm me? I'm interested in finding out the right answer, but I have no idea where my bug is, especially because it seems to be getting so much right.
If you pm me your sums I can compare them to mine.
Image
dstoneham
Posts: 1
Joined: Thu May 17, 2018 9:24 am

Problem 080

Post by dstoneham »

Should I be accounting for any leading zeros that will fall off when the rightmost digits are isolated? For instance if the square root of N is 5.02, is the first digit 0 or 2?
User avatar
jaap
Posts: 559
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 80

Post by jaap »

There is already a thread for problem 080 here.
In it you will find the answer to your question, which is that the first digit in your example is actually 5.
User avatar
hk
Administrator
Posts: 11286
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 080

Post by hk »

Topics merged.
Image
Junglemath
Posts: 58
Joined: Fri Sep 20, 2019 1:25 pm
Location: Minsk

Re: Problem 080

Post by Junglemath »

I think it's ridiculously stubborn on the part of the mods to refuse to alter the wording of the question. Many people have been thrown off by the phrase 'decimal digits' which is assumed to imply the digits after the decimal point. If you insist on retaining the current formulation of the question, the least you can do is include a note about this.
Post Reply