Hackerrank - Project Euler+ #010 - Summation of primes

Hackerrank - Problem description

The problem description - Hackerrank.

Solution

First, I created a list of all prime numbers from 2 to 106 (upper constraint). I used Sieve of Eratosthenes algorithm.

Then, I sum each element from a subset of prime numbers gained from test case.

I created solution in:

All solutions are also available on my GitHub profile.

Java

Leave a Reply