Problem 250. Project Euler: Problem 10, Sum of Primes
Solution Stats
Problem Comments
-
7 Comments
Use primes :: server encountered an error
Pritesh Shah, you are correct. Well done for spotting this when many others didn't! It could be classified as a problem with the Test Suite, but given that this is tagged as "basic matlab" it may be more fitting to amend the problem statement.
As suggested by David Verrelli on 15-Dec-2017, I have edited the problem statement to reconcile it with the test suite. For everyone's reference, the original problem statement was:
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below the input, N.
But that problem statement didn't match one of the test suite cases.
Since I didn't change the test suite, the solutions did not need to be rescored.
Solution Comments
Show commentsGroup

Matrix Manipulation I
- 16 Problems
- 98 Finishers
- Remove the air bubbles
- Remove NaN ?
- N-Dimensional Array Slice
- Back to basics 21 - Matrix replicating
- Back to basics 23 - Triangular matrix
- Make an awesome ramp for a tiny motorcycle stuntman
- Flip the main diagonal of a matrix
- surrounded matrix
- Some Assembly Required
- Set some matrix elements to zero
- Matrix with different incremental runs
- Removing rows from a matrix is easy - but what about inserting rows?
- Rotate input square matrix 90 degrees CCW without rot90
- Permute diagonal and antidiagonal
- Operate on matrices of unequal, yet similar, size
- Reverse the elements of an array
Problem Recent Solvers1893
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!