-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathday3_problem1.py
1034 lines (1026 loc) · 13.4 KB
/
day3_problem1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
numbers = '''001111011011
000110001010
011010111111
010011001110
011001101000
010100000011
100001000011
100100001101
011011001010
101001010010
110100001001
010000101010
001001111111
010011011101
100000000000
011101111000
101100101010
000010001110
011101101101
101000101010
100011101110
011101110011
010100010101
001100011011
100010010110
010001011001
001010001100
011001000111
010010010010
111100110101
011011010110
000100101011
001011111001
000101011100
101011000001
000101101101
010000111010
001011001001
100110110100
001101000011
000011001000
101111101000
110011010011
111111000111
110100010101
111111001111
110011101101
110111111110
001101011110
000111101001
100100100110
010110001110
111001111011
001111000101
110000111011
101011001110
010111001110
111101101111
111110111100
100110101010
101100000011
110010000101
110101100110
001011101101
001011010000
110010011010
101101110101
000101101110
001001101010
111100001011
110110111000
010010001000
110101100010
101000111111
001110110110
101000010100
010111011100
001001111000
000010110010
110011010010
010101110100
010100110000
000001001010
000111101000
100100010100
101111100010
100001010110
111100001110
100011100101
110100101010
010000000000
100100100000
010101011101
101001100011
011001101110
000100111111
011110111100
100101111001
111110000001
001010110111
101011100101
100100100101
011010000110
111111111010
011110100011
100100110111
111001000000
001010110100
011110101010
111101000011
101011111010
010010010111
011111010111
111100111011
011011010001
001101101111
111010100100
100001010000
111010100111
000000101101
001110001111
000110011100
101001000011
011110000011
000101110101
111110110100
000011101001
000000000101
101100101011
000110111000
111010011010
000100101000
111111110001
000101011111
001000011110
100111110000
001010100111
100110111010
001101000111
111010000100
111001011001
001101111001
101000001100
010110000111
100001110010
011100110000
010001011111
110010001101
100001111010
000110110111
011110111111
101100100111
010001110001
001000000111
101110001101
011110101001
000110101001
010010111110
010001000010
111001111001
001101001110
010110111010
101110101111
010010100001
011100010101
000001000011
100111001000
011101001110
011101011011
011100011001
111111101010
001111001011
111010010110
111001001101
100000110001
010001010010
100010001110
001000011011
000111011111
000110100011
101100110010
000010101101
101100010111
011100110100
000010001010
000000000011
100000010001
111100111111
110001010011
100100011101
101000001011
110111010011
000111101011
001000100000
010110011011
110011110101
110100011101
101001001000
001101110110
100010101111
111001110010
110101001001
111100011011
001100001001
001001001011
011011110100
000000001111
111111001001
001011111010
000010110111
110100110101
110110010011
010100001110
100100001011
111111111101
101111010110
100111100110
110000111000
101011101001
001000010010
010000111001
110011101000
010100101101
110001101100
011000001110
011010111100
011110001101
101100101001
010111110000
100110001111
000000111110
011001011010
110110011000
000001010101
000000100111
101010111001
010011100011
100110001100
110001110010
010101100001
000101101111
100101000011
010110111101
000111001101
010000011000
010101011001
010100111000
011111000010
110111001100
010101101111
000111110000
000001111100
000110000001
010001000011
011011100111
100001010101
101000011101
001110010101
001000101100
011001011001
001101000101
110101011000
000100010001
110010010101
111010111011
010010111000
010110010101
110111110110
000110110110
100001000000
011000001001
010000111011
010010000100
100000000111
100100000010
101110011111
010111101101
010011100000
000111101100
011101001100
100001111000
110000010000
000011000101
010010100000
000000110011
100100110010
010100101000
010011100111
011111010100
111111100010
111011110011
011001001100
100110111001
001100111001
000001100011
011111100010
100011110011
011001111010
010101110110
001011110100
101101101000
001000101110
111001011010
011111101000
111001101101
111011011011
111001101010
011011110010
001010001101
111000000110
100010000001
011001111101
101011001111
101010111110
100111011001
010001011010
001001101101
001110100101
010111111101
100110001101
001010001010
101000111000
000011010010
101011010001
011100001001
001111001110
100010010011
101110010001
110100011111
000001101110
010010111111
000010101010
100100000101
011101001011
100000111000
010101001100
111010100010
001001001100
111110100110
010001010000
000111000000
100101110111
011001010000
110001110101
010111011111
011101111011
001100010001
111010010010
011010000100
010110110011
011100100110
000011010110
001001110000
101011000011
101011010111
100111000000
010111100101
000001101011
000110000101
101101110111
010101110001
011011100011
100001001110
000110101111
100111011100
010110110010
010010001110
010111010100
010101101100
110111011001
101100110011
110010110001
011001000100
011111011111
101101000111
110000111110
100101100100
111001101000
001110110011
110111111010
100101011111
000110100101
000000110001
000111100001
110001000111
011000100110
101010101111
100101011110
101000010001
001101000100
010100000010
011000110100
000101011010
101101000100
110101101110
001010000000
110110111101
101000110011
100010101101
111000100101
010110100011
101100001100
101101100001
100011000001
011010011010
100011000000
110000100110
010001111100
001101011000
100111110001
010010010100
111000010011
101000011100
110011110001
001110101000
101100100101
001101010100
011110000100
111000101011
100110101011
000111010000
000110100010
111100011101
110001001010
011011100010
101110001000
000011100110
000110111111
011111110000
101000110110
011110001111
010000110111
001111001000
000101001010
000000000100
000100111110
000101110010
011100000010
101010111011
001110101110
000100000001
100100101111
110000110100
001100001100
111011100001
010111111100
010111001000
101111010111
001011001010
101010100001
101011101110
000111001100
000000010110
000000000001
000010111011
000011101110
011011011011
011111111110
001111001111
110010100100
011111001010
110011010100
010011110100
110010101100
111111101110
001110110111
100111001110
110100001111
101101001011
110011011110
100110010010
011011001000
110000111001
011100001101
101101111100
100111111110
111001101100
100101010011
000100011111
011011000100
100101111011
100011000010
010101111110
001001110110
010111011000
000101111100
101000110101
011000010001
010010010101
100000101100
101010111100
110101011110
110011011011
001011100001
001111100010
110100111100
100010101110
100110010110
101011110010
000111100000
011011110011
101100100010
111101000000
101100100110
100111101011
111111111011
011001101100
010110110000
100000010010
000011101101
111110011100
010011010011
101000001101
010100001001
011110100111
000011100010
101001110101
101010000000
101101011001
001110010001
000000101000
110001000100
111111100101
001010101001
111000110001
100011001110
110001001000
110110011011
100100111000
001100010110
001111110110
110000010010
110110011101
100011000111
010100100100
001110000000
100010110000
110010000011
111011110101
100001100110
010110101111
011010101010
110101010100
010111100011
111101111110
110111111111
011111001101
100101101010
101010001011
110000011001
000101010001
000011000000
110111111001
000100010100
111100100000
000001001001
000010010100
001110001001
001001100011
110000011100
010000101011
110110110000
111111101000
001011010001
011001011101
111000001000
101101001001
100100011110
001100111000
011011110101
010001110111
010001101101
010011101011
000010010111
011111100101
100111011000
001011010101
011110100010
011100110110
011101110000
011000101010
011110110011
001101001101
101110111001
111101110100
111010000101
001010111110
110101001011
010010101000
100010011011
111001011101
100000111100
010011100001
010101111011
011010010101
000110011111
001110000011
010101100011
000010000011
010000010111
011111110100
010010001001
101101000001
011100001011
001110011000
100001111001
100011110111
110010010000
001100001101
110001100000
011010011111
000000111101
100010111100
001000100101
010101100100
011110101110
011010110001
001111101110
001111010011
001110101101
000001000001
001110110100
111101001011
010000010010
010100101010
110011000101
010101010001
111110010000
110100110000
011101011100
111000110101
001001000011
101111011001
011100111111
011000100101
010001101001
100001011011
001010011011
110001011011
100010010001
001010010011
101111010010
000001111111
011101011010
100100000001
110011100111
101100101000
000100001000
001011101100
000001010010
110001011001
101000010111
011100100111
100101001110
000100111011
010110111011
101110100110
000011001111
011110111011
101101000000
110011110000
011001011111
010011001100
000100010111
100000111001
010110111001
010000110000
011000000111
101010001001
000010111111
010100000000
101100111000
110010110111
100100000110
100110011111
101011110100
001111111111
101011011111
011111001011
000010100010
100000001111
001111011101
110101111001
000101100110
011110011110
001110000001
111101101100
010000101001
010011001011
001000110000
111000111001
111000010111
110011101010
110010101001
111110111110
111110111000
110110101010
100010100110
110111001101
111110011001
111111111110
100000000101
001000100110
101111011111
001000001001
000000010000
010101100110
110110001000
010100000100
010101011000
001010010000
000110000010
111010011011
010000010011
011110100101
111111100000
000100100000
101001100110
111011000111
110010011111
001000000101
111000110010
111010111001
010000100010
000001000111
100110111011
001111000000
001101010110
000010000100
010001000001
011110011100
010101100101
100001011101
011010101111
000101000111
101001100100
000000100110
110101001110
100100100011
101101000110
011010110011
111010001000
011110000111
101000010101
011001111100
010110000011
011010001110
001010010100
100111111001
010011101010
111110111010
000101010010
100010000111
101011110001
010110110111
111001001010
111010110100
101010000100
110010110100
110100110001
100011010100
100101101101
011010000010
111100000010
101110110111
110001110110
000001111011
001100011100
101011100110
101011010101
111101110110
111011101000
010110010001
001000101111
101000000101
100110000010
100111011111
110110100100
111100100111
110100010000
100001111110
010111001011
011001001110
110011100100
001001100111
100100101011
110000000111
100010001101
010101110011
001010010101
111111110011
001111111110
011010110000
111111100110
000001010011
111011100111
001111000010
111101111011
011101010011
110000110111
000010100100
110001000101
100111010110
100010001100
011011111110
101111001000
000010001100
101010001101
010011110101
100001100010
010001001110
010101100111
111011111111
000010111100
110100101100
011111101100
100100011000
110110000011
111100110000
111100001111
000101111010
111110110110
110101110001
101110000010
010000010001
100111100100
000000010001
010111100100
011100001010
111011101100
111101001100
111011110000
101100011011
000110001111
011110010111
000111101010
001110001101
010010001011
000100010101
101001001101
001001010110
011100110010
010111100111
100010111111
011010001111
000010010001
111000000000
111100110111
100101000101
101001000111
101001000001
101100001111
000100101010
111100000001
111100101110
110100101110
001011011010
000010001101
101100000100
010100000101
010010000011
000010100101
110100111111
001011101110
011000100010
000111100101
010111110100
100010110110
000111010001
000011100000
110010000100
100111001101
010011111110
000010100000
001001001010
110101100111
011100101001
001011001110
111010000000
010011001000
001000010011
010001011000
010010100110
100010000000
100010101100
101011111001
010001001101
110111110100
110000000000
001100000110
000111110010
000100011011
001100001000
011000000010
001101100000
111101000111
101110001100
100011101111
010001010011
110010011110
111010101110
011011010101
100110001110
110000101110
101111111001
101110110011
000100001111
001101110011
011111100011
100001100001
101100001010
010010110110
110110010000
110000110001
100001100000
110111010001
000101100111
100110100010
111100001001
111001010100
001111101001
101000010110
000001110011
110111101101
010100000111
110100111011
111000011101
110011001001
110111101000
010010100100
000011111010
010101001000
101110011001
100000011001
111010001011
000000100001
111110010100
100101001101
010110011010
000110010110
111000001110
111111100001
101111100011
111101100011
011100000011
110111111000
011111110110
010010110111
101001000110
011111000100
100111100011
101101100101
000000101111
001101010000
000010000001
000001110101
001011000010
000011000111
001011001111
101101011110
100100110001
110000011011
010010011100
011100110101
000011110100
010000110001
100010111001
001101001111
101101100100
010001111001
111110011010
100001100011
101011001000
100110111111
100101001010
011110101111
001101011001
000101000001
001010111000
010100110111
101111110100
001110111011
101100000110
101011001001
100011011000
100100111100
111110110000
000001100010
000101100000
110000100001
011000011010
110000010111
111111001010
001111100001
111011110100
100110010011
111010110000
110111010000
100010011110
110011100110'''