Example #1
0
def is_pandigital_product(x, y):
    product_string = str(x) + str(y) + str(x*y)
    if len(product_string) != 9: return False
    return is_pandigital(int(product_string))
Example #2
0
def forms_pandigital(n):
    concat = str(n)
    for i in itertools.count(2):
        concat += str(n*i)
        if len(concat) == 9 and is_pandigital(int(concat)): return int(concat)
        elif len(concat) > 9: return 0