2025 lets goooo

This commit is contained in:
2025-12-01 11:42:09 +00:00
parent b95908d5fc
commit 841bdbcfd6
9 changed files with 235 additions and 137 deletions
+3 -3
View File
@@ -84,15 +84,15 @@ def get_puzzle_part(year, day):
def create_solution_file(year, day, part):
folder = rf"{year}/{day:02}"
os.makedirs(folder, exist_ok=True)
solution_file = os.path.join(folder, f"part {part} solution.py")
solution_file = os.path.join(folder, f"part_{part}_solution.py")
input_file_path = os.path.join(folder, "input.txt")
# Check if the solution file already exists
if not os.path.exists(solution_file):
with open(solution_file, "w") as file:
file.write(f"""testing = 1
file.write(f"""testing = True
if not testing:
with open(r"{year}/{day:02}\input.txt", "r") as file:
with open(r"{year}/{day:02}/input.txt", "r") as file:
input = file.read()
else:
input = '''