Updated Algorithms

This commit is contained in:
2021-05-28 16:13:58 -04:00
parent 2ed753a9bb
commit 3fc0cd96a8
2 changed files with 2 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class Problem28(Problem):
#Functions
#Constructor
def __init__(self):
super().__init__("What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed by starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral")
super().__init__("What is the sum of the numbers on the diagonals in a 1001 by 1001 spiral formed by starting with the number 1 and moving to the right in a clockwise direction?")
self.sumOfDiagonals = 0
#Operational functions

View File

@@ -37,6 +37,7 @@ class Problem30(Problem):
def __init__(self):
super().__init__("Find the sum of all the numbers that can be written as the sum of the fifth powers of their digits.")
self.sumOfFifthNumbers = [] #This is an ArrayList of the numbers that are the sum of the fifth power of their digits
self.sum = 0 #This is the sum of the sumOfFifthNumbers list
#Operational function
#Solve the problem