@@ -0,0 +1,457 @@
+from time import time%0Afrom itertools import permutations%0A%0ADIGITS = '1234567890'%0ADIVS = %5B2, 3, 5, 7, 11, 13, 17%5D%0A%0A%0Adef check_divs(pandigital):%0A    for i in range(1, 8):%0A        if int(pandigital%5Bi:i+3%5D) %25 DIVS%5Bi-1%5D:%0A            return False%0A    return True%0A%0A%0Adef main():%0A    print sum(%0A        %5Bint(''.join(p)) for p in permutations(DIGITS) if check_divs(''.join(p))%5D%0A    )%0A%0Aif __name__ == '__main__':%0A    t = time()%0A    main()%0A    print 'Time:', time() - t%0A

Add problem 42, pandigital substrings divisible by first primes