Home

Awesome

Advent of Code

Personal repository of Advent of Code solutions.

Quick links

About Advent of Code

Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. One programming puzzle a day is released from 1st to 25th December, divided in two parts (the second of which is unlocked after solving the first). Advent of Code is created by Eric Wastl, and is 100% free. If you like Advent Of Code and want to support its creator, you can donate to him here. If you want to hang out with other fellow coders, discuss about puzzles and solutions, or just have a look around, you can join the official subreddit: r/adventofcode, or the unofficial IRC channel: #adventofcode on irc.libera.chat, where you can also find me at the right time of the year.

About this repository

I discovered Advent of Code in 2017, and played my first edition in 2018. In this repository you can find my solutions and walkthroughs for the puzzles as well as other miscellaneus stuff like visualizations and other scripts.

In each year's directory you will find:

<sup>[1] I chose to upload "original" versions of solutions for two reasons: they are a good and fun way to see how I code, and they can be uploaded as soon as the leaderboard for the day is complete, as I often don't have time to rewrite them more cleanly right away.</sup>

How to run my solutions

Provide your input from standard input:

2022/solutions/day01.py
# Paste input here and type CTRL+D when done...

Save your input to file and pass its path as argument:

2022/solutions/day01.py path/to/your/input.txt

Directly download your input from the AoC website (you will need to extract your session cookie from your browser and replace VALUE below with the real value, please only do this if you understand what you are doing):

curl -s --cookie 'session=VALUE' 'https://adventofcode.com/2022/day/1/input' | 2022/solutions/day01.py

Contributing

If you have question or spotted a typo/bug/mistake, you are most welcome to submit a new issue. For pull reqeusts and other kinds of contributions, please read CONTRIBUTING.md.

Licensing

The content of this repository, with the exception of walkthroughs (as defined in and linked at the top of this document), is licensed under the Apache License 2.0 license, which you can find in the file LICENSE.Apache-2.0. Walkthroughs are licensed under the Creative Commons BY-NC-SA 4.0 license, which you can find in the file LICENSE.CC-BY-NC-SA-4.0.


Copyright © 2018-2023 Marco Bonelli.