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.
"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.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #170: Find the largest 0 to 9 pandigital that can be formed by concatenating products.
You are viewing a single comment's thread. Return to all comments →
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.