Skip to content

Commit

Permalink
added answers
Browse files Browse the repository at this point in the history
  • Loading branch information
anight committed Dec 11, 2024
1 parent 96fdfa1 commit d04e75e
Show file tree
Hide file tree
Showing 142 changed files with 290 additions and 36 deletions.
2 changes: 2 additions & 0 deletions 2018/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
437
655
2 changes: 2 additions & 0 deletions 2018/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
5166
cypueihajytordkgzxfqplbwn
2 changes: 2 additions & 0 deletions 2018/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
109716
124
2 changes: 2 additions & 0 deletions 2018/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
138280
89347
2 changes: 2 additions & 0 deletions 2018/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
11668
4652
2 changes: 2 additions & 0 deletions 2018/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
4166
42250
2 changes: 2 additions & 0 deletions 2018/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
OKBNLPHCSVWAIRDGUZEFMXYTJQ
982
2 changes: 2 additions & 0 deletions 2018/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
40848
34466
1 change: 1 addition & 0 deletions 2018/day25/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
399
2 changes: 2 additions & 0 deletions 2019/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3392373
5085699
2 changes: 2 additions & 0 deletions 2019/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2842648
9074
2 changes: 2 additions & 0 deletions 2019/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1285
14228
2 changes: 2 additions & 0 deletions 2019/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1694
1148
2 changes: 2 additions & 0 deletions 2019/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
12428642
918655
2 changes: 2 additions & 0 deletions 2019/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
142915
283
2 changes: 2 additions & 0 deletions 2019/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
51679
19539216
7 changes: 7 additions & 0 deletions 2019/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2480
[[@ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ ]
[@ @ @ @ @ @ @ ]
[@ @ @ @ @ @ @ @ @ @ @ @ @ @ ]]
2 changes: 2 additions & 0 deletions 2019/day09/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2399197539
35106
2 changes: 2 additions & 0 deletions 2019/day10/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
299
1419
7 changes: 7 additions & 0 deletions 2019/day11/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2373
[[ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ @ @ ]
[ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ ]]
2 changes: 2 additions & 0 deletions 2019/day12/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
9127
353620566035124
2 changes: 2 additions & 0 deletions 2019/day13/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
315
16171
2 changes: 2 additions & 0 deletions 2019/day14/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
158482
7993831
2 changes: 2 additions & 0 deletions 2019/day15/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
236
368
2 changes: 2 additions & 0 deletions 2019/day16/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
15841929
39011547
2 changes: 2 additions & 0 deletions 2019/day17/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
7404
929045
2 changes: 2 additions & 0 deletions 2019/day19/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
217
6840937
2 changes: 2 additions & 0 deletions 2019/day20/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
570
7056
1 change: 1 addition & 0 deletions 2019/day22/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1538
2 changes: 2 additions & 0 deletions 2019/day23/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
19724
15252
1 change: 1 addition & 0 deletions 2019/day24/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18859569
2 changes: 2 additions & 0 deletions 2020/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
878724
201251610
2 changes: 2 additions & 0 deletions 2020/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
569
346
2 changes: 2 additions & 0 deletions 2020/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
145
3424528800
2 changes: 2 additions & 0 deletions 2020/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
210
131
2 changes: 2 additions & 0 deletions 2020/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
989
548
2 changes: 2 additions & 0 deletions 2020/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
6585
3276
2 changes: 2 additions & 0 deletions 2020/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
248
57281
2 changes: 2 additions & 0 deletions 2020/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1753
733
2 changes: 2 additions & 0 deletions 2020/day09/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1398413738
169521051
2 changes: 2 additions & 0 deletions 2020/day10/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2272
84627647627264
2 changes: 2 additions & 0 deletions 2020/day11/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2265
2045
2 changes: 2 additions & 0 deletions 2020/day12/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1565
78883
2 changes: 2 additions & 0 deletions 2020/day13/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
161
213890632230818
2 changes: 2 additions & 0 deletions 2020/day14/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
14553106347726
2737766154126
2 changes: 2 additions & 0 deletions 2020/day15/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1111
48568
2 changes: 2 additions & 0 deletions 2020/day16/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
28884
1001849322119
2 changes: 2 additions & 0 deletions 2020/day17/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
372
1896
2 changes: 2 additions & 0 deletions 2020/day18/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
36382392389406
381107029777968
1 change: 1 addition & 0 deletions 2020/day19/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
113
2 changes: 2 additions & 0 deletions 2020/day20/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
corners tile_id product 28057939502729
2489
2 changes: 2 additions & 0 deletions 2020/day21/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2423
jzzjz,bxkrd,pllzxb,gjddl,xfqnss,dzkb,vspv,dxvsp
2 changes: 2 additions & 0 deletions 2020/day22/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
36257
33304
2 changes: 2 additions & 0 deletions 2020/day23/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
54327968
157410423276
4 changes: 0 additions & 4 deletions 2020/day23/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,8 @@ def move(self):

# Part Two

print("initializing...")

cups = Cups(list(map(int, "538914762")) + list(range(10, 1_000_001)))

print("calculating, please wait about 17 sec...")

for _ in range(10_000_000):
cups.move()

Expand Down
2 changes: 2 additions & 0 deletions 2020/day24/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
293
3967
10 changes: 0 additions & 10 deletions 2020/day24/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ def next_state(black_tiles):
next_black_tiles[coord] = True
return next_black_tiles

# A test
black_tiles = {}
for coords in load_all_tiles('test.txt'):
if coords in black_tiles:
del black_tiles[coords]
else:
black_tiles[coords] = True

assert 10 == len(black_tiles)

# Part One
black_tiles = {}
for coords in load_all_tiles('input.txt'):
Expand Down
20 changes: 0 additions & 20 deletions 2020/day24/test.txt

This file was deleted.

1 change: 1 addition & 0 deletions 2020/day25/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6421487
2 changes: 2 additions & 0 deletions 2021/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1400
1429
2 changes: 2 additions & 0 deletions 2021/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2039912
1942068080
2 changes: 2 additions & 0 deletions 2021/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
4006064
5941884
2 changes: 2 additions & 0 deletions 2021/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
38913
16836
2 changes: 2 additions & 0 deletions 2021/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
8622
22037
2 changes: 2 additions & 0 deletions 2021/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
354564
1609058859115
2 changes: 2 additions & 0 deletions 2021/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
364898
104149091
2 changes: 2 additions & 0 deletions 2021/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
456
1091609
2 changes: 2 additions & 0 deletions 2021/day09/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
580
856716
2 changes: 2 additions & 0 deletions 2021/day10/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
271245
1685293086
2 changes: 2 additions & 0 deletions 2021/day11/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1644
229
2 changes: 2 additions & 0 deletions 2021/day12/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3298
93572
7 changes: 7 additions & 0 deletions 2021/day13/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
795
## #### ## # # # # # ## ##
# # # # # # # # # # # #
# ### # ## # # # # #
# # # # # # # # # ## #
# # # # # # # # # # # # # #
## #### ## # # #### ## ### ##
2 changes: 2 additions & 0 deletions 2021/day14/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3408
3724343376942
2 changes: 2 additions & 0 deletions 2021/day15/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
458
2800
2 changes: 2 additions & 0 deletions 2021/day16/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
957
744953223228
2 changes: 2 additions & 0 deletions 2021/day17/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
10878
4716
2 changes: 2 additions & 0 deletions 2021/day18/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3981
4687
2 changes: 2 additions & 0 deletions 2021/day19/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
306
9764
2 changes: 2 additions & 0 deletions 2021/day20/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
5479
19012
2 changes: 2 additions & 0 deletions 2021/day21/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
576600
131888061854776
2 changes: 2 additions & 0 deletions 2021/day22/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
644257
1235484513229032
2 changes: 2 additions & 0 deletions 2021/day23/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
10526
41284
2 changes: 2 additions & 0 deletions 2021/day24/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
12996997829399
11841231117189
1 change: 1 addition & 0 deletions 2021/day25/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
386
2 changes: 2 additions & 0 deletions 2022/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
68442
204837
2 changes: 2 additions & 0 deletions 2022/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
13675
14184
2 changes: 2 additions & 0 deletions 2022/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
7990
2602
2 changes: 2 additions & 0 deletions 2022/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
556
876
2 changes: 2 additions & 0 deletions 2022/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FZCMJCRHZ
JSDHQMZGF
2 changes: 2 additions & 0 deletions 2022/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1757
2950
2 changes: 2 additions & 0 deletions 2022/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1743217
8319096
2 changes: 2 additions & 0 deletions 2022/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1812
315495
2 changes: 2 additions & 0 deletions 2022/day09/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
6745
2793
7 changes: 7 additions & 0 deletions 2022/day10/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
13440
###..###..####..##..###...##..####..##..
#..#.#..#....#.#..#.#..#.#..#....#.#..#.
#..#.###....#..#....#..#.#..#...#..#..#.
###..#..#..#...#.##.###..####..#...####.
#....#..#.#....#..#.#.#..#..#.#....#..#.
#....###..####..###.#..#.#..#.####.#..#.
2 changes: 2 additions & 0 deletions 2022/day11/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
98280
17673687232
2 changes: 2 additions & 0 deletions 2022/day12/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
437
430
2 changes: 2 additions & 0 deletions 2022/day13/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
6187
23520
2 changes: 2 additions & 0 deletions 2022/day14/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
638
31722
2 changes: 2 additions & 0 deletions 2022/day15/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
5511201
11318723411840
2 changes: 2 additions & 0 deletions 2022/day17/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3163
1560932944615
2 changes: 2 additions & 0 deletions 2022/day18/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
4450
2564
2 changes: 2 additions & 0 deletions 2022/day20/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
5498
3390007892081
2 changes: 2 additions & 0 deletions 2022/day21/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
87457751482938
3221245824363
2 changes: 2 additions & 0 deletions 2022/day22/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
126350
129339
2 changes: 2 additions & 0 deletions 2022/day23/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
3689
965
2 changes: 2 additions & 0 deletions 2022/day24/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
308
908
1 change: 1 addition & 0 deletions 2022/day25/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
121=2=1==0=10=2-20=2
2 changes: 2 additions & 0 deletions 2023/day01/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
52974
53340
2 changes: 2 additions & 0 deletions 2023/day02/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1931
83105
2 changes: 2 additions & 0 deletions 2023/day03/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
527144
81463996
2 changes: 2 additions & 0 deletions 2023/day04/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
21821
5539496
2 changes: 2 additions & 0 deletions 2023/day05/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
51752125
12634632
2 changes: 2 additions & 0 deletions 2023/day06/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1108800
36919753
2 changes: 2 additions & 0 deletions 2023/day07/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
251927063
255632664
2 changes: 2 additions & 0 deletions 2023/day08/answers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
21409
21165830176709
Loading

0 comments on commit d04e75e

Please sign in to comment.