Euler Rust Implementation
Organization
All files share a common prefix with their problem number. All shared functions are moved to files in the include subfolder
Tests
Generic Problems
For each problem it will check the answer against a known dictionary. If the problem is not in the "known slow" category (meaning that I generate the correct answer with a poor solution), it will run it as many times as the benchmark plugin wants. Otherwise it is run exactly once.
A test fails if it gets the wrong answer or if it takes more than 1 minute.
Dependencies
I try to keep the dependencies of this project as small as possible, except for test plugins. At the moment there are no non-test dependencies for this section.
Usage
This folder contains a Makefile with several recipes, most of which are aliases to cargo
commands.
This facilitates the root Makefile dispatching tasks to each language, many of which have more complex
build or test processes.
- test
Alias for
cargo test
.
- test_auto
Runs tests in parallel with one less thread than you have CPUs. Alias for
cargo test -j
.
- test_%
Runs tests in parallel with the specified number of threads. Alias for
cargo test -j $*
.
- clean
Alias for
cargo clean
.
Live Tests
To run these problems in your browser, click here!
Library Code
Problems Solved
- Rust Implementation of Problem 1
- Rust Implementation of Problem 2
- Rust Implementation of Problem 3
- Rust Implementation of Problem 4
- Rust Implementation of Problem 5
- Rust Implementation of Problem 6
- Rust Implementation of Problem 7
- Rust Implementation of Problem 8
- Rust Implementation of Problem 9
- Rust Implementation of Problem 10
- Rust Implementation of Problem 11
- Rust Implementation of Problem 12
- Rust Implementation of Problem 13
- Rust Implementation of Problem 14
- Rust Implementation of Problem 15
- Rust Implementation of Problem 16
- Rust Implementation of Problem 17
- Rust Implementation of Problem 18
- Rust Implementation of Problem 19
- Rust Implementation of Problem 20
- Rust Implementation of Problem 21
- Rust Implementation of Problem 22
- Rust Implementation of Problem 23
- Rust Implementation of Problem 24
- Rust Implementation of Problem 25
- Rust Implementation of Problem 27
- Rust Implementation of Problem 28
- Rust Implementation of Problem 34
- Rust Implementation of Problem 35
- Rust Implementation of Problem 36
- Rust Implementation of Problem 37
- Rust Implementation of Problem 41
- Rust Implementation of Problem 43
- Rust Implementation of Problem 44
- Rust Implementation of Problem 45
- Rust Implementation of Problem 53
- Rust Implementation of Problem 59
- Rust Implementation of Problem 67
- Rust Implementation of Problem 69
- Rust Implementation of Problem 76
- Rust Implementation of Problem 77
- Rust Implementation of Problem 87
- Rust Implementation of Problem 187
- Rust Implementation of Problem 357
- Rust Implementation of Problem 836