Page 4 of 4

Re: Problem 013

Posted: Thu Nov 07, 2013 2:44 am
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

Re: Problem 013

Posted: Thu Nov 07, 2013 4:34 am
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).

Re: Problem 013

Posted: Thu Nov 07, 2013 10:26 am
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.

Re: Problem 013

Posted: Thu Nov 07, 2013 10:33 pm
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!

Problem 013

Posted: Tue Nov 26, 2013 11:43 am
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

Re: Problem 013 - Clarification

Posted: Tue Nov 26, 2013 11:46 am
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.

Re: Problem 013 - Clarification

Posted: Tue Nov 26, 2013 1:00 pm
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.

Re: Problem 013 - Clarification

Posted: Tue Nov 26, 2013 2:28 pm
by agrubner
Got it! Thanks.

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

Thank you for your comment above.

Regards
Alex

Re: Problem 013

Posted: Tue Nov 26, 2013 2:45 pm
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.

Problem 13

Posted: Mon Jul 28, 2014 2:15 pm
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?

Re: Problem 013

Posted: Mon Jul 28, 2014 3:56 pm
by mpiotte
I merged your topic with an already existing one. In the future, please check if a topic already exists.

Re: Problem 013

Posted: Wed Feb 17, 2016 1:34 pm
by akarypid
Hello everyone,

I solved the problem and wanted to discuss how many digits are needed to get the correct answer. (snip)

Re: Problem 013

Posted: Wed Feb 17, 2016 7:28 pm
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)

Re: Problem 013

Posted: Sun May 21, 2017 1:43 am
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).

Re: Problem 013

Posted: Sun May 21, 2017 9:14 am
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.

Problem 13

Posted: Mon Apr 22, 2019 5:40 am
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?

Re: Problem 13

Posted: Mon Apr 22, 2019 8:09 am
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.

Re: Problem 013

Posted: Mon May 30, 2022 2:35 pm
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?

Re: Problem 013

Posted: Mon May 30, 2022 7:42 pm
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.