<jupyter_start><jupyter_text>[Project Euler](https://ProjectEuler.net)[This Python 3 notebook](Project%20Euler%20%28Python%203%29.ipynb) contains *some* solutions for the [Project Euler](https://ProjectEuler.net) challenge. /!\ **Warning:** do not spoil yourself the pleasure of solving these problems by yourself![I (<NAME>)](http://perso.crans.org/besson/) started in February 2015, and worked occasionally on Project Euler problems in March and April 2015.I should try to work on it again, hence this notebook...![Badge giving the number of solved problems](https://ProjectEuler.net/profile/Naereen.png "Badge giving the number of solved problems") ---- Problem 32 : Pandigital products*Find the sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through 9 pandigital.*<jupyter_code>maxN = 987654321
maxN = 654321  # XXX Passer à la vraie valeur
l = len(str(maxN))
sum32 = 0
digits19 = set(range(1, l+1))
for multiplicand in range(1, 1+maxN):  # upto 987 654 321
    multiplier = 1
    product = multiplicand * multiplier
    while multiplier <= maxN and product <= maxN:  # Be smart here!
        digits = str(multiplicand)+str(multiplier)+str(product)
        if len(digits) == l and set(digits) == digits19:
            print("multiplicand = {}, multiplier = {}, product = {}".format(multiplicand, multiplier, product))
            print("digits =", digits)
            sum32 += product
        multiplier += 1
        product = multiplicand * multiplier

print("The sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through", l, "pandigital is")
print(sum32)<jupyter_output>The sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through 6 pandigital is
0
{'fraction_non_alphanumeric': 0.10529279279279279, 'fraction_numerical': 0.03885135135135135, 'mean_word_length': 4.27299703264095, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '561015', 'license': 'MIT', 'n_tokens_mistral': 574, 'n_tokens_neox': 507, 'n_words': 186, 'path': 'euler/Project Euler (Python 3).ipynb', 'repo_name': 'IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/narnt', 'size': '1783'}