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
use crate::Solution;
use pmath::sequences::CollatzSeq;

problem!(Problem0014, 14, "Longest Collatz Sequence");

impl Solution for Problem0014 {
    fn solve(&self) -> String {
        (1u64..1_000_000)
            .max_by_key(|&n| CollatzSeq::new(n).count())
            .unwrap()
            .to_string()
    }
}