We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a4aa96 commit c6e6881Copy full SHA for c6e6881
1 file changed
everybody_codes/tmpl.py
@@ -1,7 +1,6 @@
1
"""Everyone Codes Day N."""
2
3
import logging
4
-import time
5
from lib import helpers
6
from lib import parsers
7
@@ -22,14 +21,4 @@ def solve(part: int, data: str) -> int:
22
21
]
23
24
if __name__ == "__main__":
25
- for _part, _data, expected in TESTS:
26
- assert solve(_part, PARSER.parse(_data)) == expected
27
- print("Tests pass.")
28
- day = int(__file__.split("_", maxsplit=-1)[-1].split(".")[0])
29
- for _part in range(1, 4):
30
- with open(f"inputs/{day:02}.{_part}.txt", encoding="utf-8") as f:
31
- _input = PARSER.parse(f.read()) # type: list[list[int]]
32
- start = time.perf_counter_ns()
33
- got = solve(_part, _input)
34
- end = time.perf_counter_ns()
35
- print(f"{day:02}.{_part} {got:15} {helpers.format_ns(end - start):8}")
+ helpers.run_solution(globals())
0 commit comments