feat: 2025 init + day1.1

This commit is contained in:
s-prechtl 2025-12-02 14:17:40 +01:00
parent 95f74be063
commit 96b7dcec41
27 changed files with 44 additions and 0 deletions

21
2025/Day1/src/main.py Normal file
View file

@ -0,0 +1,21 @@
TOTAL_CLICKS = 100
if __name__ == '__main__':
current = 50
count = 0
with open("input.txt", "r") as f:
rotations = [{'direction': line[0], 'count': int(
line[1:])} for line in f.readlines()]
for rotation in rotations:
print(rotation)
# Convert left to right to avoid negatives
if rotation["direction"] == 'L':
rotation["count"] = TOTAL_CLICKS - rotation["count"]
current = (current + rotation["count"]) % TOTAL_CLICKS
if current == 0:
count += 1
print(count)

0
2025/Day10/src/main.py Normal file
View file

0
2025/Day11/src/main.py Normal file
View file

0
2025/Day12/src/main.py Normal file
View file

0
2025/Day13/src/main.py Normal file
View file

0
2025/Day14/src/main.py Normal file
View file

0
2025/Day15/src/main.py Normal file
View file

0
2025/Day16/src/main.py Normal file
View file

0
2025/Day17/src/main.py Normal file
View file

0
2025/Day18/src/main.py Normal file
View file

0
2025/Day19/src/main.py Normal file
View file

0
2025/Day2/src/main.py Normal file
View file

0
2025/Day20/src/main.py Normal file
View file

0
2025/Day21/src/main.py Normal file
View file

0
2025/Day22/src/main.py Normal file
View file

0
2025/Day23/src/main.py Normal file
View file

0
2025/Day24/src/main.py Normal file
View file

0
2025/Day25/src/main.py Normal file
View file

0
2025/Day3/src/main.py Normal file
View file

0
2025/Day4/src/main.py Normal file
View file

0
2025/Day5/src/main.py Normal file
View file

0
2025/Day6/src/main.py Normal file
View file

0
2025/Day7/src/main.py Normal file
View file

0
2025/Day8/src/main.py Normal file
View file

0
2025/Day9/src/main.py Normal file
View file