We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
At first, I was spending a lot of time thinking of what possible sets (1, 2, ..., n) would work in order to optimize. Then I discovered that trying all concatenated products N x (1, 2, ..., i) for 1 <= i <= 9, 1 <= N < 10,000 was still plenty fast.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #38: Pandigital multiples
You are viewing a single comment's thread. Return to all comments →
At first, I was spending a lot of time thinking of what possible sets (1, 2, ..., n) would work in order to optimize. Then I discovered that trying all concatenated products N x (1, 2, ..., i) for 1 <= i <= 9, 1 <= N < 10,000 was still plenty fast.