示例#1
0
def powerful_digit_sum():

    lMax = 0

    for a in range(1, 100):
        for b in range(1, 100):
            lSum = digit_sum(a ** b)
            if lSum > lMax:
#                 print('a: ' + str(a) + ' b: ' + str(b)
#                             + ' DSum: ' + str(lSum))
                lMax = lSum

    return lMax
示例#2
0
def power_digit_sum(pInt):

    return utils.digit_sum(2 ** pInt)