My Personal solutions to Advent of Code using Python
All Vanilla python with no required installed modules
Simple and easy to read (although not entirely the fastest)
Using Python 3.6, typing python3 main.py
will run all answers using the relative input text file. (day 1 used input1.txt etc.). Text files likes input5.2.txt are just the example given in the question on Advent of Code.
Usage -d
for the day you want, -p
for the part. Leave empty to run all e.g. python3 main.py
will just run all days.
For example, python3 main.py -d 5 -p 1
will run day 5, part 1. Use -i
for the input file e.g. python3 main.py -d 2 -i "../Downloads/input.txt"
.
Add the ability to run only a certain dayMaybe speed up some code, current total run time for me is about 2.3 seconds (as of day 5)Still could be sped up, current total run time is 1.4 seconds- Part 1 to 5 are quick, part 6 has just been done and takes
46.2 seconds37.77.5 seconds. - Speed isn't going to work out, day 9 part 2 takes about 30 seconds.
- Day 10 part 1 is currently printed out as ASCII art, OCR?
Micah Waring gave some speedy code to day 1 part 2