mirror of
https://bitbucket.org/Mattrixwv/projecteulerts.git
synced 2025-12-06 17:43:59 -05:00
Added solution to problem 3
This commit is contained in:
@@ -26,11 +26,12 @@ const readlineSync = require("readline-sync");
|
||||
import { Problem } from "./Problems/Problem";
|
||||
import { Problem1 } from "./Problems/Problem1";
|
||||
import { Problem2 } from "./Problems/Problem2";
|
||||
import { Problem3 } from "./Problems/Problem3";
|
||||
|
||||
|
||||
export class ProblemSelection{
|
||||
//Holds the valid problem numbers
|
||||
public static PROBLEM_NUMBERS: number[] = [1, 2];
|
||||
public static PROBLEM_NUMBERS: number[] = [1, 2, 3];
|
||||
|
||||
//Returns the problem corresponding to the given problem number
|
||||
public static getProblem(problemNumber: number): Problem{
|
||||
@@ -38,6 +39,7 @@ export class ProblemSelection{
|
||||
switch(problemNumber){
|
||||
case 1 : problem = new Problem1(); break;
|
||||
case 2 : problem = new Problem2(); break;
|
||||
case 3 : problem = new Problem3(); break;
|
||||
}
|
||||
return problem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user