aoc2022/dx.py

38 lines
822 B
Python
Raw Normal View History

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