From 52c416aa54a0114b94111bc516148d67394c31f1 Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Mon, 8 Jun 2020 00:45:10 -0400 Subject: [PATCH] Fixed error with accessing problem numbers that are not sequential --- src/main/java/mattrixwv/ProjectEuler/Driver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/mattrixwv/ProjectEuler/Driver.java b/src/main/java/mattrixwv/ProjectEuler/Driver.java index d36defa..2b7ec4d 100644 --- a/src/main/java/mattrixwv/ProjectEuler/Driver.java +++ b/src/main/java/mattrixwv/ProjectEuler/Driver.java @@ -86,13 +86,13 @@ public class Driver{ for(Integer problemLocation = 1;problemLocation < PROBLEM_NUMBERS.size();++problemLocation){ //Solve the problem System.out.print(PROBLEM_NUMBERS.get(problemLocation).toString() + ". "); - solveProblem(PROBLEM_NUMBERS.get(problemLocation)); + solveProblem(problemLocation); } } //This is if a single problem number was chosen else{ //Solve the problem - solveProblem(PROBLEM_NUMBERS.get(problemNumber)); + solveProblem(problemNumber); } } private static void solveProblem(Integer problemNumber){