Fix wrong naming for three digit problems

main
Felix Martin 2021-04-19 20:49:40 -04:00
parent 1ba50f4c3a
commit de07bfb630
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,5 @@
FROM = 88
TILL = 90
FROM = 206
TILL = 206
template = """
def euler_XXX():
@ -14,8 +14,12 @@ if __name__ == "__main__":
for i in range(FROM, TILL + 1):
e = "0" + str(i)
if i < 100:
e = "0" + str(i)
else:
e = str(i)
filename = "e" + e + ".py"
with open(filename, "w") as f:
s = template.replace("XXX", e)
f.write(s)