Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (11 sloc) 261 Bytes
s = set()
start = 1234
end = 9876
pan = set(str(123456789))
for i in xrange(2,int(end**(0.5))):
for j in xrange(start/i,end/i):
n = str(i)+str(j)+str(i*j)
if len(n) != 9 or set(n) != pan:
continue
s.add(i*j)
print sum(s)