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