This is a simple suite to capture Rust practice through the first 100 problems in Project Euler.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Quick run
rustc src/main.rs
./main <problem number>
If using cargo, you can run the solution with the following command:
cargo build
cargo run <problem number>
cargo test
Just as a reminder, try not to publish solutions beyond the first 100.
To add a new solution:
- Locate the pro
- Create a new file in
pe_via_rust/src/anthology
with the namesolution<problem number>.rs
and implement theprocess
function, which should return aString
. - Add the solution to
src/anthology.rs
with an entry of
directory.insert(
6,
(SolutionInfo {
index: 6, problem_name: String::from("Sum Square Difference") },
solution6::process
)
);