mirror of
https://bitbucket.org/Mattrixwv/projecteulerts.git
synced 2025-12-06 17:43:59 -05:00
Added solution to problem 6
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
//ProjectEulerTS/ProblemSelection.ts
|
||||
//Matthew Ellison
|
||||
// Created: 10-18-20
|
||||
//Modified: 10-18-20
|
||||
//Modified: 03-10-21
|
||||
//This class holds all of the functions needed to handle a problem
|
||||
//Unless otherwise listed all non-standard includes are my own creation and available from https://bibucket.org/Mattrixwv/typescriptClasses
|
||||
/*
|
||||
Copyright (C) 2020 Matthew Ellison
|
||||
Copyright (C) 2021 Matthew Ellison
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -29,11 +29,12 @@ import { Problem2 } from "./Problems/Problem2";
|
||||
import { Problem3 } from "./Problems/Problem3";
|
||||
import { Problem4 } from "./Problems/Problem4";
|
||||
import { Problem5 } from "./Problems/Problem5";
|
||||
import { Problem6 } from "./Problems/Problem6";
|
||||
|
||||
|
||||
export class ProblemSelection{
|
||||
//Holds the valid problem numbers
|
||||
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5];
|
||||
public static PROBLEM_NUMBERS: number[] = [1, 2, 3, 4, 5, 6];
|
||||
|
||||
//Returns the problem corresponding to the given problem number
|
||||
public static getProblem(problemNumber: number): Problem{
|
||||
@@ -44,6 +45,7 @@ export class ProblemSelection{
|
||||
case 3 : problem = new Problem3(); break;
|
||||
case 4 : problem = new Problem4(); break;
|
||||
case 5 : problem = new Problem5(); break;
|
||||
case 6 : problem = new Problem6(); break;
|
||||
}
|
||||
return problem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user