Problem 49855. Concatenated Consecutive Prime
Solution Stats
Problem Comments
-
4 Comments
The test suite only seems to work if the n primes each have the same number of digits. For example, with n=3, a perfectly good answer would be [5,7,11], but this crashes the test suite. It could be fixed by using combine=strcat(combine,strtrim(b(i,:)));
@William: your suggestion has been incorporated into the test suite.
Thank you both for improving the quality of this problem. Cheers, Doddy.
Given the limited test suite due to the nature of the question, it can be easily solved by hard-coding.
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2728 Solvers
-
Number of 1s in the Binary Representation of a Number
444 Solvers
-
Make an awesome ramp for a tiny motorcycle stuntman
652 Solvers
-
Matlab Basics II - Max & Index of Max
250 Solvers
-
find the surface area of a cube
525 Solvers
More from this Author180
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!