Problem 49855. Concatenated Consecutive Prime
37.5% Correct | 62.5% Incorrect
Last Solution submitted on Apr 08, 2023
Show 1 older comment
William on 18 Jan 2021
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,:)));
goc3 on 19 Jan 2021
@William: your suggestion has been incorporated into the test suite.
Doddy Kastanya on 19 Jan 2021
Thank you both for improving the quality of this problem. Cheers, Doddy.
Dyuman Joshi on 3 Jun 2022
Given the limited test suite due to the nature of the question, it can be easily solved by hard-coding.
Solution CommentsShow comments
Problem Recent Solvers13
Calculate the area of a triangle between three points
Sort the vector with the given index
More from this Author180
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!