advent-of-code/solutions/3
2020-12-03 11:25:20 +01:00
..
data.txt day 3 2020-12-03 11:25:20 +01:00
main.py day 3 2020-12-03 11:25:20 +01:00
README.md day 3 2020-12-03 11:25:20 +01:00
test.txt day 3 2020-12-03 11:25:20 +01:00

3

We can simply parse the forest as an array of strings. The trees repeat infinitely to the right, this screams for a good mod. This means: char = row[x % len(row)]. No complex logic needed

For the second one we simply automate the process and sum up the total. We can simply encode the coordinates as a function of the index we are current at.

Solutions
  1. 252
  2. 57 * 252 * 64 * 66 * 43 = 2608962048