Skip to content

Quentin18/advent-of-code

Repository files navigation

🎄 Advent of Code 🎄

CI pre-commit Code style: black Imports: isort License: MIT

This repository contains my Python solutions to the Advent of Code puzzles.

Installation

Clone the repository:

git clone https://github.com/Quentin18/advent-of-code.git

Move to the root of the repository:

cd advent-of-code/

Install the dependencies:

pip install -r requirements.txt

Usage

  • The repository contains one folder per year.
  • For each year, there is one folder per day named day[xx].
  • For each day, the following files are present:
    • Test input in input_test.txt
    • Puzzle input in input.txt
    • Script to solve part 1 in part1.py
    • Script to solve part 2 in part2.py

Run a solution

Move in the directory of the puzzle day (example with day 1 of 2023):

cd 2023/day01/

Run the part1.py script to get the solution of the first part:

python part1.py

Run the part2.py script to get the solution of the second part:

python part2.py

Make a new day

To make the folder for a new day, use the make_new_day.sh script (example with day 1 of 2023):

./make_new_day.sh 2023/day01

Author

Quentin Deschamps

License

MIT