## 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

Don't post any spoilers
jaap
Posts: 559
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

### Re: Problem 080

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

### Re: Problem 080

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?
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

### Re: Problem 080

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

### Re: Problem 080

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

### Re: Problem 080

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.
cptroot
Posts: 3
Joined: Wed Oct 19, 2011 4:35 am

### Problem 080

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

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

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?
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

### Re: Problem 80

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.
cptroot
Posts: 3
Joined: Wed Oct 19, 2011 4:35 am

### Re: Problem 80

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.
PurpleBlu3s
Posts: 75
Joined: Mon Sep 19, 2011 6:49 pm

### Re: Problem 80

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.
dstoneham
Posts: 1
Joined: Thu May 17, 2018 9:24 am

### Problem 080

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

### Re: Problem 80

In it you will find the answer to your question, which is that the first digit in your example is actually 5.
hk
Posts: 11286
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

### Re: Problem 080

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

### Re: Problem 080

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.