Project Euler 32 - Pandigital products

Official link: https://projecteuler.net/problem=32

Thought Process

With problems like this I usually aim to decrease my search range. What I first noticed is that 99x99 = 9,801, this means that any 2 digit x 2 digit number will never be able to produce the desired pandigital as it will only form 8 integers.

This means that we need to have:

  1. A 2 digit integer multiplied by a 3 digit integer

  2. A 1 digit integer multiplied by a 4 digit integer

Then I go through these combinations and see if sorted(str(x) + str(y) + str(x*y)) = ['1', '2', '3', '4', '5', '6', '7', '8', '9'], if it is I add it to a set (As per the question HINT there may be duplicates)

Interactive Code

No interactive code for this problem, my code is given below