This repository has been archived on 2024-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
aoc2023/dx.py

38 lines
822 B
Python
Raw Normal View History

2023-12-08 05:57:38 +01:00
import lib
2023-12-06 17:47:04 +01:00
EXAMPLE = """
"""
def solve(lines: list[str]):
res = 0
for (i, line) in enumerate(lines):
print(i, line)
2023-12-08 05:57:38 +01:00
# digits = lib.str_to_int_list(line)
# digit = lib.str_to_single_int(line)
2023-12-06 17:47:04 +01:00
return res
def solve2(lines: list[str]):
res = 0
for (i, line) in enumerate(lines):
print(i, line)
return res
def main():
2023-12-08 05:57:38 +01:00
lines = lib.str_to_lines_no_empty(EXAMPLE)
print("Example 1:", solve(lines))
2023-12-06 17:47:04 +01:00
return
2023-12-08 05:57:38 +01:00
lines = lib.str_to_lines_no_empty(open("ix.txt").read())
print("Solution 1:", solve(lines))
2023-12-06 17:47:04 +01:00
return
2023-12-08 05:57:38 +01:00
lines = lib.str_to_lines_no_empty(EXAMPLE)
print("Example 2:", solve2(lines))
2023-12-06 17:47:04 +01:00
return
2023-12-08 05:57:38 +01:00
lines = lib.str_to_lines_no_empty(open("ix.txt").read())
print("Solution 2:", solve2(lines))
2023-12-06 17:47:04 +01:00
if __name__ == "__main__":
main()