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
klloveall wrote:Alright, so, I know this is a comparatively simple problem, and I'm sure it's something stupid I can't find, but I just can't seem to get it. I've got a function that takes two strings of numbers and sums them together and returns a string. I've tested it for the first 5 numbers and it works just fine. I've also checked to make sure that it is adding the last number, and it is and that I didn't copy/paste them incorrectly into the file (I checked the first and last, since the rest are of the same length and I copied them as one block I assume they're okay). Any one have any idea on what could be going wrong? The number I get is 52 digits and begins with a 5 and ends with a 2.
Maybe you overlooked what exactly you are supposed to enter into the answer box:
jaap wrote:Maybe you overlooked what exactly you are supposed to enter into the answer box:
Work out the first ten digits of the sum
Oh no, I got that. And entered 5*******64 and it said that was wrong (which I assume it is but I can't figure out why).
Are you 100% sure everything fits in your datatypes?
In what language are you trying? If it's C# or another similar language I can try to review your code and try to give you a hint.
Well, I figured it out. The error was not at all in in the adding bit, but in the part where I looped over all the numbers. I found out that it was adding the last number twice and that was throwing my number off enough to be wrong, but not enough to be noticeable. :/ Also when I checked the last number it was there. I just didn't notice it was there twice.
I work on Problem 13, where it is mentioned to add all the digits (what I did). The subject of this problem is: "Work out the first ten digits of the sum of the following one-hundred 50-digit numbers." Then I should type the first ten digits of this sum. When I sum up all the digits of this 100*50 MatrixNumberBlock, then I got 22660.
Can you clarify very clear, what the question is? What is exactly to do here?
You got 100 numbers. Add them somehow.
The result of the adding is called the sum of these 100 numbers.
The result is rather large, so give the leftmost 10 digits of this sum.
War ruins the life and health of untold numbers of innocent children.
Hi, my interpretation is to find the first ten digits counting from left in the sum result, but when I post my first ten digit answer into the Answer field, it's wrong. Then I tried the 10 digits counting from right, still wrong. So I'm confused about what this problem is asking for?
Haha. I think I just got it. This will be a fun problem. Will it involve primes? Smiles. You mathematicians love primes. I am not a mathematician. I am a 100% total and permanent disabled veteran who worked as a chemical engineer before stress precipitated schizoaffective disorder (bipolar type).
Haha. I think I just got it. This will be a fun problem. Will it involve primes? Smiles. You mathematicians love primes. I am not a mathematician. I am a 100% total and permanent disabled veteran who worked as a chemical engineer before stress precipitated schizoaffective disorder (bipolar type).
I have to disappoint you: No primes, today.
War ruins the life and health of untold numbers of innocent children.
reza1615 wrote: Mon Apr 22, 2019 5:40 am
Hi all,
I don't undrestand the description of problem 13. what does it need? would you please tell me by an example?
Hi reza1615,
I merged your post with the existing topic for this problem. You may find what you need in this thread.
I'm not sure I understand this problem correctly. Initially I thought I should sum all the digits but it looked too easy and by the way you it ask for the first 10 digits, which would be strange because the max result then would be 9*150=1350. Maybe each line contains a whole number and I have to sum them? In that case, "first 10 digits" it is meant from the left or from the right?
Liquid25677 wrote: Mon May 30, 2022 2:35 pm
Maybe each line contains a whole number and I have to sum them? In that case, "first 10 digits" it is meant from the left or from the right?
Yes, there are a hundred lines, each with a single 50-digit number. These 100 numbers are to be summed.
"First 10 digits" means from the left.