view problem30.py @ 14:49c96972949d default tip

#50 rewrite of solution
author Dominic Cleal <dominic@computerkb.co.uk>
date Mon, 01 Dec 2008 19:11:55 +0000
parents 0e08f4decf67
children
line wrap: on
line source

t = 0
for i in xrange(2, 9999999):
	if i == sum([int(c)**5 for c in str(i)]):
		t += i
		print "got %d, total %d" % (i, t)