Advent of Code 2020 ๐ Ruby Solutions by @Aquaj
Readme based on Adrienne Tacke's AoC solutions repository.
Advent of Code is an online event created by Eric Wastl. Each year, starting on Dec 1st, an advent calendar of small programming puzzles are unlocked once a day at midnight (EST/UTC-5). Developers of all skill sets are encouraged to solve them in any programming language they choose!
After saving Christmas five years in a row, you've decided to take a
vacation at a nice resort on a tropical island. Surely, Christmas will go
on without you.
The tropical island has its own currency and is entirely cash-only. The
gold coins used there have a little picture of a starfish; the locals just
call them stars. None of the currency exchanges seem to have heard of them,
but somehow, you'll need to find fifty of these coins by the time you
arrive so you can pay the deposit on your room.
To save your vacation, you need to get all fifty stars by December 25th.
Collect stars by solving puzzles. Two puzzles will be made available on
each day in the Advent calendar; the second puzzle is unlocked when you
complete the first. Each puzzle grants one star. Good luck!
Done during Le Wagon Bordeaux's BICODE challenge
These were not written as example of clean or efficient code but are simply my attempts at finding the answers to each day's puzzle as quickly as possible. Performance logging was added simply as a fun way to compare implementations with other BICODE competitors.
Days 1 through 11 included were done in one sitting during the night from the 10th to the 11th, other puzzles were done each day at publishing time.
Each day computes and displays the answers to both of the day questions and their computing time in ms. To run it type ruby day<number>.rb
.
If the session cookie value is provided through the SESSION env variable (dotenv is available to provide it) โ it will
fetch the input from the website and store it as a file under the inputs/
folder on its first run.