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

Don't post any spoilers
m34tcode
Posts: 4
Joined: Sun May 22, 2011 8:02 pm

### Problem 056

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?
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

### Re: 056 - Digital Sum

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

### Re: 056 - Digital Sum

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

### Re: 056 - Digital Sum

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

### Re: Problem 056

Hi,

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

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.
petersc
Posts: 7
Joined: Fri Feb 24, 2012 2:55 pm

### Re: Problem 056

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

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

### Re: Problem 056

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

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

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

### Re: Problem 056

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

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.