Problem 013

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: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 013

Post by jaap »

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:
Work out the first ten digits of the sum
klloveall
Posts: 4
Joined: Wed Nov 06, 2013 11:21 pm

Re: Problem 013

Post by klloveall »

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).
pieppiep
Posts: 23
Joined: Thu Dec 30, 2010 6:23 am

Re: Problem 013

Post by pieppiep »

klloveall wrote:
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.
Image
klloveall
Posts: 4
Joined: Wed Nov 06, 2013 11:21 pm

Re: Problem 013

Post by klloveall »

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.

Thanks for your help everyone!
agrubner
Posts: 8
Joined: Fri Feb 17, 2012 12:19 pm

Problem 013

Post by agrubner »

Dear Team

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?

Thanks and regards
Alexander Grubner
agrubner
Posts: 8
Joined: Fri Feb 17, 2012 12:19 pm

Re: Problem 013 - Clarification

Post by agrubner »

...you mean, I should add all the 50digit numbers 100 times as we have 100 x 50 numbers... . Just thought again. THanks for your confirmation.
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 013 - Clarification

Post by hk »

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.
Image
War ruins the life and health of untold numbers of innocent children.
agrubner
Posts: 8
Joined: Fri Feb 17, 2012 12:19 pm

Re: Problem 013 - Clarification

Post by agrubner »

Got it! Thanks.

Was then thinking in that direction and answered myself the question... .

Thank you for your comment above.

Regards
Alex
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 013

Post by hk »

I I merged your topic with an already existing one.
Please check in the future of there exists a topic for a problem already.
Image
War ruins the life and health of untold numbers of innocent children.
dalewang
Posts: 1
Joined: Mon Jul 28, 2014 2:08 pm

Problem 13

Post by dalewang »

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?
User avatar
mpiotte
Administrator
Posts: 1961
Joined: Tue May 08, 2012 5:40 pm
Location: Montréal, Canada

Re: Problem 013

Post by mpiotte »

I merged your topic with an already existing one. In the future, please check if a topic already exists.
Image
akarypid
Posts: 1
Joined: Fri Feb 12, 2016 4:17 pm

Re: Problem 013

Post by akarypid »

Hello everyone,

I solved the problem and wanted to discuss how many digits are needed to get the correct answer. (snip)
Last edited by rayfil on Fri Feb 19, 2016 1:23 am, edited 1 time in total.
Reason: Problems should not be discussed in this forum
User avatar
dawghaus4
Posts: 56
Joined: Fri Nov 29, 2013 2:22 am

Re: Problem 013

Post by dawghaus4 »

I think that if you re-read the forum posts, you will find that it was pointed out that those who thought (snip)
Last edited by rayfil on Fri Feb 19, 2016 1:24 am, edited 1 time in total.
Reason: Same reason as above
User avatar
HappyS5
Posts: 11
Joined: Wed Apr 26, 2017 9:17 pm

Re: Problem 013

Post by HappyS5 »

Hello,


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).
HappyS5
Chris
User avatar
hk
Administrator
Posts: 12832
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 013

Post by hk »

HappyS5 wrote: Sun May 21, 2017 1:43 am Hello,


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.
Image
War ruins the life and health of untold numbers of innocent children.
reza1615
Posts: 1
Joined: Mon Apr 22, 2019 5:37 am

Problem 13

Post by reza1615 »

Hi all,
I don't undrestand the description of problem 13. what does it need? would you please tell me by an example?
User avatar
RobertStanforth
Administrator
Posts: 2666
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 13

Post by RobertStanforth »

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.
Liquid25677
Posts: 9
Joined: Thu May 26, 2022 4:07 pm

Re: Problem 013

Post by Liquid25677 »

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?
User avatar
RobertStanforth
Administrator
Posts: 2666
Joined: Mon Dec 30, 2013 11:25 pm

Re: Problem 013

Post by RobertStanforth »

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.
Post Reply