mirror of
https://bitbucket.org/Mattrixwv/projecteulerjava.git
synced 2025-12-06 17:13:58 -05:00
Fixed a few typos
This commit is contained in:
@@ -109,7 +109,7 @@ public class Benchmark{
|
|||||||
}
|
}
|
||||||
//Runs all problems except a few that are specified because of run length
|
//Runs all problems except a few that are specified because of run length
|
||||||
private static void runAllShort(){
|
private static void runAllShort(){
|
||||||
//Ask how many times to run the problem
|
//Ask how many times to run the problems
|
||||||
int timesToRun = getNumberOfTimesToRun();
|
int timesToRun = getNumberOfTimesToRun();
|
||||||
|
|
||||||
//Run through all valid problem numbers, skipping a few that are in the tooLong list
|
//Run through all valid problem numbers, skipping a few that are in the tooLong list
|
||||||
@@ -170,7 +170,7 @@ public class Benchmark{
|
|||||||
System.out.print("Solving");
|
System.out.print("Solving");
|
||||||
for(int cnt = 0;cnt < timesToRun;++cnt){
|
for(int cnt = 0;cnt < timesToRun;++cnt){
|
||||||
System.out.print('.');
|
System.out.print('.');
|
||||||
//Reset the data so you are actually counting the run time a second time
|
//Reset the data so you are actually counting the run time an additional time
|
||||||
problem.reset();
|
problem.reset();
|
||||||
//Solve the problem
|
//Solve the problem
|
||||||
problem.solve();
|
problem.solve();
|
||||||
@@ -181,7 +181,7 @@ public class Benchmark{
|
|||||||
}
|
}
|
||||||
//Prints the benchmark results of a problem
|
//Prints the benchmark results of a problem
|
||||||
private static String getBenchmarkResults(Problem problem, double totalTime, int timesRun){
|
private static String getBenchmarkResults(Problem problem, double totalTime, int timesRun){
|
||||||
//Calculate the averate run time of the problem
|
//Calculate the average run time of the problem
|
||||||
totalTime /= timesRun;
|
totalTime /= timesRun;
|
||||||
String timeResults = Stopwatch.getStr(totalTime);
|
String timeResults = Stopwatch.getStr(totalTime);
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import java.util.Scanner;
|
|||||||
|
|
||||||
|
|
||||||
public class Driver{
|
public class Driver{
|
||||||
private static enum SELECTIONS{SOLVE, DESCRIPTION, LIST, EXIT, BENCHMARK, SIZE};
|
private static enum SELECTIONS{SOLVE, DESCRIPTION, LIST, BENCHMARK, EXIT, SIZE};
|
||||||
private static final Scanner input = new Scanner(System.in);
|
private static final Scanner input = new Scanner(System.in);
|
||||||
|
|
||||||
public static void main(String[] args){
|
public static void main(String[] args){
|
||||||
@@ -58,7 +58,7 @@ public class Driver{
|
|||||||
private static SELECTIONS getMenuSelection(){
|
private static SELECTIONS getMenuSelection(){
|
||||||
Integer selection = input.nextInt();
|
Integer selection = input.nextInt();
|
||||||
while(!isValidMenu(selection)){
|
while(!isValidMenu(selection)){
|
||||||
System.out.println("That is an invalid option!Press Enter to continue");
|
System.out.println("That is an invalid option!\nPress Enter to continue");
|
||||||
printMenu();
|
printMenu();
|
||||||
selection = input.nextInt();
|
selection = input.nextInt();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import mattrixwv.ProjectEuler.Problems.*;
|
|||||||
|
|
||||||
public class ProblemSelection{
|
public class ProblemSelection{
|
||||||
private static final Scanner input = new Scanner(System.in);
|
private static final Scanner input = new Scanner(System.in);
|
||||||
public static final ArrayList<Integer> PROBLEM_NUMBERS = new ArrayList<Integer>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
public static final ArrayList<Integer> PROBLEM_NUMBERS = new ArrayList<Integer>(Arrays.asList( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
||||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||||
31, 67));
|
31, 67));
|
||||||
|
|||||||
Reference in New Issue
Block a user