# Project Euler #119: Digit power sum

# Project Euler #119: Digit power sum

lester_munoz + 1 comment Any hint to why i'm getting wrong answer on all testcases except 0, 18 and 19

lester_munoz + 0 comments I found my mistake, the digital sum can be higher than 1000 with bases bigger than 10

ajayprajapati141 + 1 comment is 10^100 bound given in decimal or base B?

at361 + 0 comments decimal

kitchent + 0 comments I wonder how many digits would it be if it is base and the number is . One digit? How do you count ? or ?

**EDIT**: The answer is the latter one. This implies that the upper bound of the digit sum for bases can be beyond . I used`(100 / len(str(B-1)) + 1) * (B - 1)`

.

platzmaPritzma + 2 comments This part of the question was not clear.

We know the summation and the number is on base 10 however n's base did not specified. 512 = (5+1+2)^n

Should we accept that as on base 10?

platzmaPritzma + 0 comments How about summation? Let (x)_b stands for number x on base b. Should we look for the following equality? (ABC)_b = ((A)_b+(B)_b+(C=_c)^n

cantonios + 1 comment Base of n doesn't matter. The base B only matters for the digit summation. For example, with B=2, we have 5^4=1001110001_2=625. You can express the 5 and 4 in base 2 if you want, but it doesn't change the answer.

nitishingde + 0 comments can u post some of the output for base=2, i don't know where i am going worng

a_khachatryan93 + 1 comment I dont understand how we can be sure that a count of that numbers are not infinite ? or maybe I didn't understand the task correctly ?

cantonios + 0 comments Because it says all numbers below 10^100, so there are at most 10^100 numbers regardless of the base.

a7medabdeldaim + 1 comment I don't understand what is base (B)???

i made the sequential without B

sks147Asked to answer + 0 comments Base B is the number system,

B = 2: Binary B = 8: Octal B = 10: Decimal and so on...

orchisamadas + 1 comment The part about the base is confusing. I solved the problem as given in Project Euler with a base of 10 by using some mathematical intuition. But I can't figure out how to use the same technique for a different base. Can anyone give some hints regarding how to handle the bases?

sjeuler + 0 comments any arithmetical operation gives the same results no matter what base you use as long as you operate by the rules of the number system... That's why computers can use base 2 :)

sjeuler + 1 comment I guess it's allowed to copy code from a bigint library?

shashank21jHackerRank Admin + 0 comments yes

ahmed_maalej + 0 comments ddddd

Sort 12 Discussions, By:

Please Login in order to post a comment