Skip to content

Commit e436d26

Browse files
committed
Complete day 1 of 2024
0 parents  commit e436d26

File tree

8 files changed

+1108
-0
lines changed

8 files changed

+1108
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.activeBackground": "#65c89b",
4+
"activityBar.background": "#65c89b",
5+
"activityBar.foreground": "#15202b",
6+
"activityBar.inactiveForeground": "#15202b99",
7+
"activityBarBadge.background": "#945bc4",
8+
"activityBarBadge.foreground": "#e7e7e7",
9+
"commandCenter.border": "#15202b99",
10+
"sash.hoverBorder": "#65c89b",
11+
"statusBar.background": "#42b883",
12+
"statusBar.foreground": "#15202b",
13+
"statusBarItem.hoverBackground": "#359268",
14+
"statusBarItem.remoteBackground": "#42b883",
15+
"statusBarItem.remoteForeground": "#15202b",
16+
"titleBar.activeBackground": "#42b883",
17+
"titleBar.activeForeground": "#15202b",
18+
"titleBar.inactiveBackground": "#42b88399",
19+
"titleBar.inactiveForeground": "#15202b99"
20+
},
21+
"peacock.color": "#42b883"
22+
}

2024/00/input-example.txt

Whitespace-only changes.

2024/00/input-puzzle.txt

Whitespace-only changes.

2024/00/solve.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
def read_input(file_path: str) -> list[str]:
2+
with open(file_path, "r") as file:
3+
return file.readlines()
4+
5+
6+
def solve1(input_lines: list[str]) -> str:
7+
input = []
8+
for line in input_lines:
9+
input.append(line)
10+
11+
12+
def solve2(input_lines: list[str]) -> str:
13+
input = []
14+
for line in input_lines:
15+
input.append(line)
16+
17+
18+
def main():
19+
example_input_lines = read_input("input-example.txt")
20+
puzzle_input_lines = read_input("input-puzzle.txt")
21+
# part 1
22+
example_output1 = solve1(example_input_lines)
23+
print(f"Example output 1:\n{example_output1}\n")
24+
puzzle_output1 = solve1(puzzle_input_lines)
25+
print(f"Puzzle output 1:\n{puzzle_output1}\n")
26+
# part 2
27+
example_output2 = solve2(example_input_lines)
28+
print(f"Example output 2:\n{example_output2}\n")
29+
puzzle_output2 = solve2(puzzle_input_lines)
30+
print(f"Puzzle output 2:\n{puzzle_output2}")
31+
32+
33+
if __name__ == "__main__":
34+
main()

2024/01/input-example.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
3 4
2+
4 3
3+
2 5
4+
1 3
5+
3 9
6+
3 3

0 commit comments

Comments
 (0)