Commit e8143dfb authored by Taddeus Kroes's avatar Taddeus Kroes

Solved 38

parent 5bfdb814
#!/usr/bin/env python
def concatprod(number, n):
s = str(number)
for i in xrange(2, n + 1):
s += str(number * i)
return s
def ispandig(s):
return sorted(s) == map(None, '123456789')
m = ''
for number in xrange(192, 100000):
n = c = 2
while int(c) < 999999999:
c = concatprod(number, n)
n += 1
if ispandig(c):
m = c
print number, n, c
print m
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment