## Sum of numbers that can be written as the sum of their fifth power. ##

import timeit


start = timeit.default_timer()

def euler_30():
    fifth_pow = lambda x: x**5
    total = 0
    for i in xrange(2, 1000000):
        if sum(map(fifth_pow, map(int, str(i)))) == i:
            total += i
    return total

print "Answer: %s" % euler_30()
stop = timeit.default_timer()
print "Time: %f" % (stop - start)

@@ -1,9 +1,8 @@
-#
 # Sum of
@@ -67,10 +67,8 @@
 er. 
-##
 %0A%0Aim
@@ -168,21 +168,21 @@
     
-total = 0%0A   
+return sum(%5Bi
  for
@@ -205,26 +205,32 @@
 1000000)
-:%0A
+ if%0A    
         
 if sum(m
@@ -221,18 +221,19 @@
         
-if
+   
  sum(map
@@ -271,49 +271,10 @@
 == i
-:%0A            total += i%0A    return total
+%5D)
 %0A%0Apr

return sum without total variable