Problem 056

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.
Post Reply
m34tcode
Posts: 4
Joined: Sun May 22, 2011 8:02 pm

Problem 056

Post by m34tcode »

The problem isn't quite clear, where it says 'a,b<100'

for those who don't really know math notation(like me), it could mean either a<100 and b<100 or a<b<100

anyone else run into that problem?
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: 056 - Digital Sum

Post by GenePeer »

It's short-form for a<100 & b<100.
Image
xe3tec
Posts: 46
Joined: Thu May 05, 2011 8:52 am
Location: Vienna
Contact:

Re: 056 - Digital Sum

Post by xe3tec »

I think most people know that "," ist just an "and". Its obvious.
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: 056 - Digital Sum

Post by GenePeer »

Obviously, (s)he didn't know that.
Image
germanparente
Posts: 3
Joined: Sat Feb 04, 2012 8:44 am

Re: Problem 056

Post by germanparente »

Hi,

I have a question about this problem.

I guess there's a way to find the solution without doing the full calculations. If I am right, it's possible to have a hint ?

Thanks.
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 056

Post by thundre »

germanparente wrote: I guess there's a way to find the solution without doing the full calculations. If I am right, it's possible to have a hint ?
No, I think you have to do all of the calculations. It's not too many, since the maximum exponent is 99.

To solve this problem, you must learn how to accurately multiply integers which are too big to fit in standard 32 or 64-bit variables and find the digits of the result.
Image
petersc
Posts: 7
Joined: Fri Feb 24, 2012 2:55 pm

Re: Problem 056

Post by petersc »

I am fairly confident in my algorithm, but am not getting the correct answer. Could someone knock the dust off of their old solution and maybe provide a few digital sums for large values of a and b for me to check my results against?

Thanks!
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 056

Post by thundre »

petersc wrote:Could someone knock the dust off of their old solution and maybe provide a few digital sums for large values of a and b for me to check my results against?
digitSum(2014) = 22
digitSum(4567) = 450
digitSum(9437) = 310
Image
User avatar
jaap
Posts: 554
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 056

Post by jaap »

Here are some digit sums for a=4:

4^1 : 4
4^2 : 7
4^3 : 10
4^4 : 13
4^5 : 7
4^6 : 19
4^7 : 22
4^8 : 25
4^9 : 19
4^10 : 31
4^20 : 61
4^30 : 82
4^40 : 112
4^50 : 115
4^60 : 172
4^70 : 202
4^80 : 205
4^90 : 244
4^99 : 262
petersc
Posts: 7
Joined: Fri Feb 24, 2012 2:55 pm

Re: Problem 056

Post by petersc »

Thank you both for your prompt responses.

Powers of 4: CHECK!
20^14: 22

But... alas...
45^67: 540 (Strangely a transposition of the same digits in Thundre's answer)
94^37: 350

I guess I've got some digging to do. :?

Thanks again.
Archangelix
Posts: 2
Joined: Fri Jun 26, 2015 11:56 am

Re: Problem 056

Post by Archangelix »

Do natural numbers include number zero as well? I googled the definition of natural numbers and this is what I found:

noun
the positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well.
User avatar
jaap
Posts: 554
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 056

Post by jaap »

Archangelix wrote:Do natural numbers include number zero as well? I googled the definition of natural numbers and this is what I found:

noun
the positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well.
Do you think including or excluding zero will make a difference to the answer of the problem?
Archangelix
Posts: 2
Joined: Fri Jun 26, 2015 11:56 am

Re: Problem 056

Post by Archangelix »

jaap wrote:
Archangelix wrote:Do natural numbers include number zero as well? I googled the definition of natural numbers and this is what I found:

noun
the positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well.
Do you think including or excluding zero will make a difference to the answer of the problem?
Hmmm... sorry, nvm. I misunderstood the problem. Now that I see the discussions in this forum I understand what's actually being questioned here.
Post Reply