-
1 Comment
Shibabrat
on 6 Dec 2017
Yes, finally a notorious prime problem! It was so satisfying to see the large range test cases pass. As hinted by someone, the trick is to avoid unnecessary computation, be it computing the primes or checking for 5 in the digits. I recommend careful timing of each code segment.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!