summa for in xrange 10000 123456789 987654321 for in xrange list str i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
>>> summa=0
>>> for i in xrange(2,10000):
a=123456789/i
b=987654321/i
for n in xrange(a,b+1):
s=list(str(i*n))
if len(set(s))==9 and not '0' in s:
summa+=i
break
>>> print summa
44994444