Nice test cases!
With a more robust Test Suite many/most of the submissions would fail for ignoring the Problem Statement instruction that primes must be less than n. Please add test cases in which the input x (or "n") is itself a prime.
Find common elements in matrix rows
1266 Solvers
Vectorize the digits of an Integer
271 Solvers
Given a window, how many subsets of a vector sum positive
753 Solvers
Basics: 'Find the eigenvalues of given matrix
326 Solvers
179 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!