#!/usr/bin/python

from functools import reduce
from math import sqrt

pan_set = set()

for i in range(1000, 9999):
    for j in range(2, int(sqrt(i)) + 1):
        if j * (i // j) == i:
            if len(set(str(j) + str(i // j) + str(i)) - set('0')) == 9:
                pan_set.add(i)

print(sum(pan_set))

Add solution for problem 32
Add solution for problem 32

This is an optimized solution, with some hint from Euler forum, after
solved with a slow brute algorith using permutation (see 24). BTW, with
some analisys is possible to reduce the searching space
