set up day 5
This commit is contained in:
parent
535b0f0f08
commit
0f8c9c22be
3 changed files with 1396 additions and 0 deletions
1352
day_05/input.txt
Normal file
1352
day_05/input.txt
Normal file
File diff suppressed because it is too large
Load diff
16
day_05/program.py
Executable file
16
day_05/program.py
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# https://adventofcode.com/2024/day/5
|
||||||
|
|
||||||
|
def get_lines(filename: str) -> list:
|
||||||
|
with open(filename, "r") as file:
|
||||||
|
return [line.strip() for line in file.readlines()]
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
lines = get_lines("sample-input.txt")
|
||||||
|
# lines = get_lines("input.txt")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
28
day_05/sample-input.txt
Normal file
28
day_05/sample-input.txt
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
47|53
|
||||||
|
97|13
|
||||||
|
97|61
|
||||||
|
97|47
|
||||||
|
75|29
|
||||||
|
61|13
|
||||||
|
75|53
|
||||||
|
29|13
|
||||||
|
97|29
|
||||||
|
53|29
|
||||||
|
61|53
|
||||||
|
97|53
|
||||||
|
61|29
|
||||||
|
47|13
|
||||||
|
75|47
|
||||||
|
97|75
|
||||||
|
47|61
|
||||||
|
75|61
|
||||||
|
47|29
|
||||||
|
75|13
|
||||||
|
53|13
|
||||||
|
|
||||||
|
75,47,61,53,29
|
||||||
|
97,61,53,29,13
|
||||||
|
75,29,13
|
||||||
|
75,97,47,61,53
|
||||||
|
61,13,29
|
||||||
|
97,13,75,29,47
|
||||||
Loading…
Add table
Add a link
Reference in a new issue