Add input file reading to solution files
This commit is contained in:
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_1\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_10\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_11\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_12\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_13\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_14\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_15\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_16\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_17\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_18\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_19\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_2\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_20\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_21\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_22\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_23\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_24\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_25\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_3\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_4\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_5\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_6\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_7\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_8\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
with open('advent_of_code_2023\day_9\input.txt', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
|||||||
+7
-1
@@ -29,4 +29,10 @@ for i in range(1, 26):
|
|||||||
|
|
||||||
# Create the solution file
|
# Create the solution file
|
||||||
with open(solution_file_path, "w") as file:
|
with open(solution_file_path, "w") as file:
|
||||||
file.write("import os\n\n")
|
file.write(f"""import os
|
||||||
|
|
||||||
|
with open('{input_file_path}', 'r') as file:
|
||||||
|
input = file.read()
|
||||||
|
|
||||||
|
print(input)
|
||||||
|
""")
|
||||||
|
|||||||
Reference in New Issue
Block a user