mirror of
https://bitbucket.org/Mattrixwv/projecteulerrust.git
synced 2025-12-06 17:43:58 -05:00
Updated to allow benchmarking
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//ProjectEulerRust/src/Problems/Problems31.rs
|
||||
//Matthew Ellison
|
||||
// Created: 06-19-20
|
||||
//Modified: 06-19-20
|
||||
//Modified: 07-21-20
|
||||
//How many different ways can £2 be made using any number of coins?
|
||||
//Unless otherwise listed all non-standard includes are my own creation and available from https://bibucket.org/Mattrixwv/RustClasses
|
||||
/*
|
||||
@@ -57,10 +57,10 @@ pub fn solve() -> Answer{
|
||||
//Stop the timer
|
||||
timer.stop();
|
||||
|
||||
return Answer::new(format!("There are {} ways to make 2 pounds with the given denominations of coins", permutations), timer.getString());
|
||||
return Answer::new(format!("There are {} ways to make 2 pounds with the given denominations of coins", permutations), timer.getString(), timer.getNano());
|
||||
}
|
||||
|
||||
/* Results:
|
||||
There are 73682 ways to make 2 pounds with the given denominations of coins
|
||||
It took 109.300 microseconds to solve this problem
|
||||
It took an average of 100.789 microseconds to run this problem through 100 iterations
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user