You are viewing a single comment's thread. Return to all comments →
That's mine :
Generate all pandigital numbers of provided size (I use string permutation to compute them quite fast)
Then split into a/b/c of various sizes and try to find a match in a * b = c
Save c only once in your sum (ex : 4312 and 3412 give 4*3 = 12 and 3*4 = 12. Save 12 only once !)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #32: Pandigital products
You are viewing a single comment's thread. Return to all comments →
That's mine :
Generate all pandigital numbers of provided size (I use string permutation to compute them quite fast)
Then split into a/b/c of various sizes and try to find a match in a * b = c
Save c only once in your sum (ex : 4312 and 3412 give 4*3 = 12 and 3*4 = 12. Save 12 only once !)