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

6
2024/Day11/.clang-format Normal file
View file

@ -0,0 +1,6 @@
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 100
PointerAlignment: Right
AlignAfterOpenBracket: BlockIndent
AlignArrayOfStructures: Left

17
2024/Day11/Makefile Normal file
View file

@ -0,0 +1,17 @@
CC = gcc
CC_FLAGS = -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -ggdb
CC_LINK_FLAGS =
.PHONY: all run clean
all: run
run: build
./target/main.o
build: src/main.c
mkdir -p target
$(CC) -o target/main.o src/main.c $(CC_FLAGS) $(CC_LINK_FLAGS)
chmod u+x target/main.o
clean:
rm -r target/*

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