CT099

Pandigital Products

MediumAcceptance: 0.0%

An n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, the 7-digit number 7254 is unusual: 39 x 186 = 7254, containing digits 1-9. Given n, find the sum of all products whose multiplicand, multiplier, and product together form a 1 through n pandigital string.

Example 1:

Input: 9
Output: 45228

Example 2:

Input: 4
Output: 12

Example 3:

Input: 5
Output: 52

Constraints:

4 <= n <= 9

Tags:

math pandigital brute-force
Loading...
Test Cases:No test cases
No test cases available.
Coding Problem Not Found | CodeTikki