master
E. Almqvist 4 years ago
parent 9bbd79508a
commit 95fc3cc4fc
  1. 10
      2020/3.py

@ -5,14 +5,6 @@ inp = get_input(3).splitlines()
mapp = inp
def step(startx, starty):
return startx + 3, starty + 1
def getaround(x, y):
left = mapp[x-1][y]
right = mapp[x+1][y]
return left, right
maplen = len(mapp)
def slope(a, b):
@ -38,4 +30,4 @@ tree1 = slope(3, 1)
print("1:", tree1)
tree2 = slope(1, 1) * tree1 * slope(5, 1) * slope(7, 1) * slope(1, 2)
print(tree2)
print("2:", tree2)

Loading…
Cancel
Save