This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Note that this is a real solution of the problem since π(x) is monotonic.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = [5 4 7 3 1];
y_correct = 7;
assert(isequal(mostPrimes(x),y_correct));
ans =
7
|
2 | Pass |
%%
x = [5 3 1];
y_correct = 5;
assert(isequal(mostPrimes(x),y_correct));
ans =
5
|
1966 Solvers
2518 Solvers
Find out missing number from a vector of 9 elements
207 Solvers
203 Solvers
Sum of odd numbers in a matrix
232 Solvers