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.
Project Euler #43: Sub-string divisibility
Project Euler #43: Sub-string divisibility
Sort by
recency
|
30 Discussions
|
Please Login in order to post a comment
Here is my C++ solution and it's simple approach.**
THE QUESTION IS INCORRECT! INSTEAD OF "Find the sum of all 0 to N pandigital numbers with this property." WRITE THE CODE FOR "Find the sum of all N pandigital numbers with this property."
I WAS STUCK FOR AN HOUR JUST TO FIGURE OUT THAT THE QUESTION THEY ASKED WAS INCORRECT!!
My codes take 10s in Colab and can't pass test case 6. Can anyone help me optimize?
Thanks in advance!
C++ Solution :
There are only 44 combinations of 3 unique numbers (0-9) that are divisable by 17.
The problem has very lax requirements, but for N=9, you can do this in 2 ms using Python 3.