Finish day 3 part 1
This commit is contained in:
parent
9f807ba000
commit
281615042f
2 changed files with 335 additions and 0 deletions
323
2020/day 3/P1/input.txt
Normal file
323
2020/day 3/P1/input.txt
Normal file
|
@ -0,0 +1,323 @@
|
|||
....#...............##...#...#.
|
||||
#...#..#.....##.##.#.##....#...
|
||||
...#.....#...#.................
|
||||
#..#..#.......#...#.#..........
|
||||
...##..#.#..........##...#.....
|
||||
........###.#.##..#............
|
||||
...###......##.#..#.#...#.#....
|
||||
......##..#.#....#...#.........
|
||||
.................#......#......
|
||||
..............##....#..........
|
||||
#.....................#...#.#.#
|
||||
.##..#............##...##.##..#
|
||||
.....#.####...#..##......#.#..#
|
||||
#.......#.#..#......##.#.#....#
|
||||
.....##...###.#..........##....
|
||||
#...........#.##....##.....#..#
|
||||
..###..##.##.....#....#........
|
||||
...#.#.#............#.#..#....#
|
||||
#......#....#...##.#.#.#.#..#..
|
||||
.......#.#...#..#..#..##......#
|
||||
.....#..#.............#..#...#.
|
||||
##..#.##.....#........#........
|
||||
....##....#..#...........#...#.
|
||||
.......#........##.......##....
|
||||
..##...#.......#........##.#...
|
||||
..........#..#.....##........#.
|
||||
..#..##..#............#........
|
||||
.#.#...#...#.......#......#....
|
||||
....#....#.....#.#.........###.
|
||||
.............#...#....#..#.#...
|
||||
##.#...#..#......#.#.##.....#..
|
||||
#...##.#..........#..#.#...#...
|
||||
#####.......#.#.....#..#.......
|
||||
#...#...#........#....#...#....
|
||||
......##.#..#..#............#..
|
||||
....#....#.......#...###.......
|
||||
.#......##...#.##....#...#.....
|
||||
..#....#...##.....#.#...##.#...
|
||||
#.......#........#.####........
|
||||
#.##..#..#.........#.#........#
|
||||
.#...#.#.#.#......#....#.#..#..
|
||||
#...####...##.##.#....#......##
|
||||
..#...#......##........#.....#.
|
||||
...#.#....##...................
|
||||
...##................#.........
|
||||
...##.....##........#....#..#..
|
||||
.........#..#.....#............
|
||||
.#..#.......................#..
|
||||
.#.........#..##........#.#.#.#
|
||||
......#.....##..#.##...#..#.##.
|
||||
..#..............##.......#....
|
||||
...............##....#...##..#.
|
||||
###...#..###.........#...#.....
|
||||
...#..#...#....#.....##........
|
||||
....#..##...#........#.........
|
||||
..#......#.......#.....#..#....
|
||||
.#...........##.....###....#...
|
||||
.#..#.....##.........##.....#..
|
||||
....##.#.....#................#
|
||||
..#..#......#.#..#....#..##....
|
||||
#.....#...##............#......
|
||||
.#.............#....#.......#..
|
||||
#.........#..#...##.#...#.#.##.
|
||||
...#......#..####....#.#.....#.
|
||||
......#........#..........##.##
|
||||
......##.#..##.##.....#........
|
||||
##.....#..##.##..#.......##....
|
||||
.##.........#...........#...#..
|
||||
.....#...###..#...#...........#
|
||||
..........#.#......#.###.....#.
|
||||
...#.............#.##......##..
|
||||
#.##.........#..###...........#
|
||||
....#..##....#..#..#........###
|
||||
...#........##.......##..#..#..
|
||||
...#......#..#.#...............
|
||||
#......###....#.#..#.#..#....#.
|
||||
#.#.####.#.........#..#.#.#....
|
||||
.....#....#...............#...#
|
||||
.#........#......#.#...#.......
|
||||
................#...#.....##...
|
||||
.............#...####..........
|
||||
.................##....##.###..
|
||||
#................#......#......
|
||||
.###.#........#..##.....#..###.
|
||||
..#.#..#...#..#.#...#.#.....#.#
|
||||
.....#............#..##..#..#.#
|
||||
#........##.#...#.....#........
|
||||
#.#.#..###......###............
|
||||
...#..#...........##...#.....#.
|
||||
......#........#...#.#....#....
|
||||
....#..........#.#..#.#....##..
|
||||
...#.....##..#......#.#.##...#.
|
||||
.........#..#................#.
|
||||
..#....#.##.....#.......#......
|
||||
...#.....#.......##.##.....#...
|
||||
#...#..............#..###..#...
|
||||
#.#......#.#....#........##..#.
|
||||
...#...##...##..#.........#....
|
||||
..#...#......##.#.#.#....##....
|
||||
#.......#.......#..#..#........
|
||||
.........#..#.....#....#.....##
|
||||
.#......#.......#.#..#..#...#.#
|
||||
..#....#.#..#..................
|
||||
#.....####..........#.#.....#.#
|
||||
.#..#.#.#....#.#.....#.#.......
|
||||
....##......#..#.....#.#.#...#.
|
||||
...##...#......##.#....##.#....
|
||||
..#..##....#...#...........#...
|
||||
.......#........#...##.#.......
|
||||
#.#..#....##.#....##...........
|
||||
.......#............#..##..##..
|
||||
#.#.#.....#....##.#.#.#.....#..
|
||||
##...#...#.......#..#...#.....#
|
||||
##..##.##..........#........##.
|
||||
..............#.....#..#..##...
|
||||
.......#...#.........#....#.#..
|
||||
...#..#..#....#.#....##........
|
||||
..#.......#....#....##.........
|
||||
#...#.....#..#.#...##....#.....
|
||||
.....##..#..##..#..............
|
||||
.....##............#....#.#....
|
||||
..#.....#....##.#.....#..#.....
|
||||
#...#..#..#......#.#.#..##.....
|
||||
.............................##
|
||||
#...#.#................#....#.#
|
||||
.#.#.#....##......###..##......
|
||||
#.....#..#.##.#.#.##...###.....
|
||||
.........#............##..#....
|
||||
.#..#...#....#.....#.#........#
|
||||
...............#......#..#.....
|
||||
...................###........#
|
||||
.###..##..##.......#.#.........
|
||||
#.........#......#....#.#...#..
|
||||
.#.#....#.......#.#..##...##...
|
||||
.#.....#....##.......#.#.....#.
|
||||
.........#...#....#.#..........
|
||||
....###..#..##.#...##....#..#..
|
||||
...#.#..##.#.........###.#..#..
|
||||
#...#...........#....#.........
|
||||
....##...........#.#.#......###
|
||||
#....#...........##..#.........
|
||||
###....#.....#.......#....###..
|
||||
.#.......#....#.#.#.#......#.#.
|
||||
........#...............#.#.#..
|
||||
....#.........#.....#...##.##.#
|
||||
...#............#.............#
|
||||
..........#..#.................
|
||||
........#.....##............#.#
|
||||
..#...##........#...#.....#.#..
|
||||
....#........#.#.#..........#..
|
||||
#.#...#...........#............
|
||||
....#.#...##...........#.....#.
|
||||
...........#.#..#.....#........
|
||||
.....#..#..#..#.....#.#.....#.#
|
||||
#.....#.......#.......#...#....
|
||||
#.........#....#.#........#..#.
|
||||
...#..#.........#.....#..#.....
|
||||
...#..#.............#..........
|
||||
.#.......#..........#.....#...#
|
||||
.....#.#......#.......#....#...
|
||||
...#.....#..#..##....##....#...
|
||||
.#.#.#..#...#.....#....#.......
|
||||
..##.#..........#.....#.#......
|
||||
..#..#.............#...##..##..
|
||||
.#.............#..#....##...#..
|
||||
..#...#.....#.................#
|
||||
..##.......#.....#...#....#....
|
||||
.#..#.##.........#...#.#...#...
|
||||
...##.......##..#.....##.##...#
|
||||
........####.#.........#.......
|
||||
..#.#...##.#..#..#.......##.#..
|
||||
.#..#............###..#..#.....
|
||||
#.....#.#...#.#.......#........
|
||||
..........#......#.#...#...#...
|
||||
..#......#..#..#.#...#.........
|
||||
..###........#.#....#.#...##...
|
||||
.#.....#..#.#......#........#..
|
||||
.#...#..#...#....#.......#..#..
|
||||
..#....#..#.....#.#........#...
|
||||
#..#.#.........#..........#..#.
|
||||
.#.....##....#.........#.#.#.#.
|
||||
#.#...#.....#.#.#....#.#..#....
|
||||
.........#...................#.
|
||||
..#.....#..##...#..........#.#.
|
||||
..............#....#.........#.
|
||||
.#....#.....#..............##..
|
||||
#...#...#.#........##.........#
|
||||
....###....#.#....#.#.........#
|
||||
.....#........#.....##.........
|
||||
.#...##..##..#.........##......
|
||||
............#.....#........#...
|
||||
..#....#.......#......#..#.#.#.
|
||||
#.......#.#...........#..##.#..
|
||||
......#.##......#....#.......#.
|
||||
.....#........#...###.....#....
|
||||
###..........#........#.#.#....
|
||||
.....#...#.#...#...#...##.....#
|
||||
.##...#.#........#.#....#......
|
||||
......#.........#.....#.#......
|
||||
.....#.##.....###.#...#...##..#
|
||||
.#.#.......##....#..#..#.##....
|
||||
.####...###.#.#.#.#............
|
||||
......#..##...#..........#.##.#
|
||||
......#............#...........
|
||||
.....#.#..#.......##...##......
|
||||
......#........#..#....#.#.#.#.
|
||||
#..#..#.....#..#.....#.......#.
|
||||
.#...#.....#..............#....
|
||||
.#....#..#.##.#............####
|
||||
..........#....#.##...#.#......
|
||||
...#.#.#.#.#.......#.........#.
|
||||
##........#..##..#.........#...
|
||||
..#......#...#..#.#.....#......
|
||||
..#.#......#...#...#.#.........
|
||||
........................##.....
|
||||
...#.##.#........#...#.......#.
|
||||
..#.#......#....##........#.#..
|
||||
#......#.##........#..#......#.
|
||||
.....#..#..#.............#.....
|
||||
......#......#........#....#...
|
||||
...#....###.....#..#.#....#....
|
||||
#.......................#....#.
|
||||
..#...#...................#....
|
||||
....#..#.....##.#..#...#.....#.
|
||||
...#.........#...#.......#.....
|
||||
..#....#.....#...#...#.#####...
|
||||
.....####......#...........#...
|
||||
......#.#..........#...#.#.#..#
|
||||
###..#.#....#..#...............
|
||||
...#...###..#..#.#.#...........
|
||||
.....#...#.##.#.#.###..##......
|
||||
.........#...........#....##.#.
|
||||
....#..#......#................
|
||||
...........#..#..#...#.#.......
|
||||
..#.....#......##.###..........
|
||||
.........#...................#.
|
||||
..........#...#.#....##........
|
||||
..#...##....#....#.......#...##
|
||||
#......#.....#...#...#...#.....
|
||||
....##...#.#.......#.#...##....
|
||||
...#.....#....#.....#....#.....
|
||||
#....##.....##..##..........##.
|
||||
.....#.....#.#.#...............
|
||||
.#.##....#.....#.#..#....#..##.
|
||||
.....#.#.....##....#...........
|
||||
.........#..#.......##..##.....
|
||||
..#....##.....###...#....#.#...
|
||||
............#......#.#...#..#..
|
||||
#..##......#.#.##....#.#.......
|
||||
.#.#.....#...#.#.#....#.....#..
|
||||
#....#..#.#....#...#...........
|
||||
......#.#.....#...#.#.#......#.
|
||||
###..#....#.###.............#..
|
||||
..............#####........###.
|
||||
..#..#.#.#.#......#......#.....
|
||||
###.........#.#..........#..#.#
|
||||
.#.........#...#......####.....
|
||||
..#.......####..#....#...#..#..
|
||||
#.#..#.#...............#.#.#.#.
|
||||
###....#.....##.#....#......##.
|
||||
..#..#........#....###.#.#.....
|
||||
...#.#..........#.....#...#....
|
||||
....#......##.#............#..#
|
||||
...##...#.....#..##....#..#.#.#
|
||||
.......#.....#..#....#....##.#.
|
||||
.#..#....#..#......##....##...#
|
||||
..#......#...#.#..###..#.##....
|
||||
#...#.....#......##...#.......#
|
||||
.....#.#.....#...##............
|
||||
.#..##.##..#..##.#........#....
|
||||
....#.#......##...#.#.#.#..##..
|
||||
.#..............##........#....
|
||||
.##....#..#..#....#...#......#.
|
||||
............###....##.......##.
|
||||
..............####.....#.......
|
||||
........##..##.#...#.......#...
|
||||
....#..#.....##.......#####...#
|
||||
.##..##..#.....#...#..#..#....#
|
||||
##..#.#.#...........#..........
|
||||
#..#......#...#....#...........
|
||||
...#..##.#..........#..#.......
|
||||
........#.#.....#......##......
|
||||
.....#....#............#.......
|
||||
.#.#..#....##......#.......###.
|
||||
.#..#.#........#......#...##..#
|
||||
...#....#......#..#........#.##
|
||||
.........#..#...#..#.#.##......
|
||||
....###.#...........#...#......
|
||||
.##............#.......#..##...
|
||||
##...#.#...............#.#...##
|
||||
..#..#.....#.#..#..#...........
|
||||
..#..#.##..#......#.##..#.#....
|
||||
..#...#......#.#...#....##.#...
|
||||
...###....####......#....#...#.
|
||||
.......##........#.....##....#.
|
||||
.........##..........#...#.....
|
||||
.....#............#.##.#....#.#
|
||||
..........#...#....##..........
|
||||
....................#......#...
|
||||
#......#..#...#.............##.
|
||||
...........#...................
|
||||
..#...#.........#.##.#..##.#...
|
||||
#.#....#.#.....#............#..
|
||||
.#..#.....#.....####......#.#..
|
||||
#....#.......##..#...........#.
|
||||
............#...#.....#..#.#...
|
||||
#...........#...#####....#...#.
|
||||
..........#...###..##.........#
|
||||
#.....###............#..#..#.#.
|
||||
...##.....#....#......#.....#..
|
||||
#....#.......#..#......###...#.
|
||||
...##.##......##..##..........#
|
||||
.......#.#..#.#..#.#.#.#..#..#.
|
||||
..#..###...#....#.....#......#.
|
||||
...#.........#..#.##.#.....###.
|
||||
..#.........#.##.#..#..#..###..
|
||||
..####..#.........#.........#.#
|
||||
..#.#...#.......#....##........
|
||||
.#......#.#....................
|
||||
..........#.......#.#..#..#....
|
||||
..#........#....#.#..#.........
|
||||
..#.....#.............#....#...
|
||||
##...#.........#.....#...#.....
|
12
2020/day 3/P1/toboggan_trajectory.py
Normal file
12
2020/day 3/P1/toboggan_trajectory.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
m = [m for m in open("input.txt").read().split("\n")[:-1]]
|
||||
|
||||
|
||||
|
||||
i = (0,0)
|
||||
t = 0
|
||||
while i[0] < len(m):
|
||||
if m[i[0]][(i[1]%len(m[0]))] == "#":
|
||||
t += 1
|
||||
i = (i[0]+1, i[1]+3)
|
||||
|
||||
print(t)
|
Loading…
Reference in a new issue