# Digit Fifth Powers https://projecteuler.net/problem=30
def sumOfFifthPower(n):
    digits = [int(i) for i in str(n)]
    result = 0
    for j in digits:
        result = result + j**5
    return result

digitFifthPowers = []
for n in range(2, 1000000):
    if(n == sumOfFifthPower(n)):
        digitFifthPowers.append(n)
        print(digitFifthPowers)

sum = 0
for x in digitFifthPowers:
    sum += x

print(sum)
281d7ba1aa0b720a467e151c4fb9c11c0114d42a
<mask token>

def sumOfFifthPower(n):
    digits = [int(i) for i in str(n)]
    result = 0
    for j in digits:
        result = result + j ** 5
    return result


<mask token>

def sumOfFifthPower(n):
    digits = [int(i) for i in str(n)]
    result = 0
    for j in digits:
        result = result + j ** 5
    return result


<mask token>
for n in range(2, 1000000):
    if n == sumOfFifthPower(n):
        digitFifthPowers.append(n)
        print(digitFifthPowers)
<mask token>
for x in digitFifthPowers:
    sum += x
print(sum)

def sumOfFifthPower(n):
    digits = [int(i) for i in str(n)]
    result = 0
    for j in digits:
        result = result + j ** 5
    return result


digitFifthPowers = []
for n in range(2, 1000000):
    if n == sumOfFifthPower(n):
        digitFifthPowers.append(n)
        print(digitFifthPowers)
sum = 0
for x in digitFifthPowers:
    sum += x
print(sum)

# Digit Fifth Powers https://projecteuler.net/problem=30
def sumOfFifthPower(n):
    digits = [int(i) for i in str(n)]
    result = 0
    for j in digits:
        result = result + j**5
    return result

digitFifthPowers = []
for n in range(2, 1000000):
    if(n == sumOfFifthPower(n)):
        digitFifthPowers.append(n)
        print(digitFifthPowers)

sum = 0
for x in digitFifthPowers:
    sum += x

print(sum)