Skip to content

Commit 19d167b

Browse files
committed
Fix formatting
1 parent a1f588d commit 19d167b

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

2025/day-03/main.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# --- Day 3: Lobby ---
22

3+
34
def part1():
45
lines = """
56
987654321111111
67
811111111111119
78
234234234234278
89
818181911112111
9-
""".split("\n")
10+
""".split(
11+
"\n"
12+
)
1013

11-
lines = open('../inputs/day-03.txt', 'r').readlines()
14+
lines = open("../inputs/day-03.txt", "r").readlines()
1215
total = 0
1316
for line in lines:
1417
# split to digits
@@ -25,13 +28,16 @@ def part1():
2528
total += max_joltage
2629
return total
2730

31+
2832
def part2():
2933
lines = """987654321111111
3034
811111111111119
3135
234234234234278
32-
818181911112111""".split('\n')
36+
818181911112111""".split(
37+
"\n"
38+
)
3339

34-
lines = open('../inputs/day-03.txt', 'r').readlines()
40+
lines = open("../inputs/day-03.txt", "r").readlines()
3541
# total = 0
3642
max_digits = 12
3743
total = 0
@@ -58,10 +64,11 @@ def part2():
5864
result.append(max_digit)
5965
start = max_pos + 1
6066

61-
max_joltage = int(''.join(map(str, result)))
67+
max_joltage = int("".join(map(str, result)))
6268
total += max_joltage
6369
return total
6470

71+
6572
if __name__ == "__main__":
6673
print("Part 1:", part1())
6774
print("Part 2:", part2())

2025/day-04/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# 4
1+
# 4

0 commit comments

Comments
 (0)