Project Euler 571 - Super Pandigital Numbers

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

Note: My code takes ~900 seconds to run, but most people used the same brute force solution so I don't care too much

Thought Process

Just complete brute force. 

I use itertools.permutations to generate all the permutations of numbers [0, 1, ..., 11] in lexicographic order which represents a base 12 number. Then I go through the permutations, skipping entries where 0 is at the front, then I check if that permutation is 11-super-pandigital, since I know it is pandigital in base 12.

Could definitely be optimized after looking at other solutions on the thread but the structure almost everyone used is the same as mine, hence I'm not too bothered.

Interactive Code

Input an Integer (yourinput)

Code will output the sum of the 10 smallest yourinput-super-pandigital numbers and it will also print the numbers in their base yourinput and base 10 form