peuler 0.1.0

A Rust crate with solutions to the Project Euler problems
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Solution;
use pmath::primes::sieve_of_eratosthenes;

problem!(Problem0010, 10, "Summation of Primes");

impl Solution for Problem0010 {
    fn solve(&self) -> String {
        const LIMIT: u64 = 2_000_000;
        sieve_of_eratosthenes(LIMIT - 1)
            .into_iter()
            .sum::<u64>()
            .to_string()
    }
}