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.
- All Contests
- ProjectEuler+
- Project Euler #170: Find the largest 0 to 9 pandigital that can be formed by concatenating products.
- Discussions
Project Euler #170: Find the largest 0 to 9 pandigital that can be formed by concatenating products.
Project Euler #170: Find the largest 0 to 9 pandigital that can be formed by concatenating products.
Sort by
recency
|
11 Discussions
|
Please Login in order to post a comment
Some key observations: - generate all pandigitals numbers - Multiplications greater than 2 can be represented as 2 multiplications - There is an upper bound for factors a - Generate all pandigital concatenated products and use binary search
Project Euler #170 is a mathematical problem that asks to find the largest 0 to 9 pandigital number that can be formed by concatenating products. A pandigital number is a number that contains each of the digits 0 to 9 exactly once.
The solution to this problem involves finding two 3-digit numbers whose product, when concatenated with the two numbers, results in a 0 to 9 pandigital. One approach to solve this problem is to use a brute force method, which involves checking every possible combination of 3-digit numbers and their buy hand sanitiser products. Another approach is to use mathematical properties of pandigital numbers and primes to limit the search space.
Once the largest pandigital number has been found, the solution is the number itself. This problem requires a strong understanding of number theory and a good grasp of algorithms and optimization techniques. The solution also requires a good deal of computational resources and time.
Note:
"Notice that a[i] and b[i][j] are positive" means that b[] cannot be 0. (Allowing there to be a b=0 creates many more solutions and significatnly complicates things.)
Also: The order of the b[] 's is important. You concatenate the products in the same order that you multply the a x b[j] which is crucial when deciding which solution to accept. You cant order b[] incrementally which I initially did.
t=int(input()) n=int(input())
main=['0','1','2','3','4','5','6','7','8','9']
for i in range(1,10): for j in range(1,n): for k in range(1,n):
can anyone post the code for this