@@ -0,0 +1,1186 @@
+from time import time%0Afrom itertools import permutations%0A%0A%0ADIGITS = 123456789%0A%0A%0Adef is_pandigital_product(num):%0A    for l in range(1, len(str(num))):%0A        candidate_num = int(str(num)%5B0:l%5D)%0A%0A        if candidate_num %3E 2 * int(str(num)%5Bl:%5D):%0A            break%0A%0A        product_idx = 2%0A        products = %5Bstr(candidate_num)%5D%0A%0A        try:%0A            while True:%0A                product = product_idx * candidate_num%0A                start_product = len(''.join(products))%0A%0A                if product != int(str(num)%5Bstart_product:start_product + len(str(product))%5D):%0A                    break%0A%0A                products.append(str(product))%0A                product_idx += 1%0A%0A        except ValueError:%0A            print 'Products:', products%0A            return True%0A%0A    return False%0A%0A%0Adef main():%0A    pandigitals = sorted(%5Bint('9' + ''.join(p)) for p in permutations(str(DIGITS)%5B:-1%5D)%5D, reverse=True)%0A    for candidate in pandigitals:%0A        if is_pandigital_product(candidate):%0A            break%0A        else:%0A            candidate -= 1%0A    print 'Max pandigital concatenated product:', candidate%0A%0A%0Aif __name__ == '__main__':%0A    t = time()%0A    main()%0A    print 'Time:', time() - t%0A

Add problem 38, pandigital multiples