Euler txt files now follow naming convention

This commit is contained in:
2021-04-22 15:17:19 -04:00
parent 5be3b11e54
commit 7825acbd73
21 changed files with 11 additions and 10 deletions

View File

@@ -3,7 +3,7 @@ def get_score_for_name(name):
def euler_022():
with open('../txt/EulerProblem022.txt', 'r') as f:
with open('../txt/e022.txt', 'r') as f:
names = f.read().split(',')
names.sort()
s = sum([(i + 1) * get_score_for_name(name)
@@ -15,3 +15,4 @@ if __name__ == "__main__":
assert(get_score_for_name('COLIN') == 53)
assert(euler_022() == 871198282)
print("e022.py: {}".format(euler_022()))