News

Short Hints on December 2

Written on 02.12.2022 23:00 by Sven Rahmann

Good evening,

just a quick hint for today's problem. It's not particularly difficult but somewhat annoying. In essence, you are converting every line of the input file into a score value and add up all the score values. The meaning of the input changes between part 1 and part 2, but in both parts, you have 9 possible inputs (combinations of letters) to convert into a score. As you have learned, you can do this in at least 3 ways: if/elif/.../else chains, match/case, or using a dict. All of them are fine. The nasty part is getting the score value correct.

Since AoC punishes you for wrong answers by blocking you for one minute (initially, more minutes if you repeatedly enter wrong answers on the same problem), it is recommended to run tests with the provided example first (as explained in a previous tutorial, "test driven development"). Good luck!

 

Privacy Policy | Legal Notice
If you encounter technical problems, please contact the administrators.