-
Notifications
You must be signed in to change notification settings - Fork 0
/
day1.py
212 lines (209 loc) · 1.26 KB
/
day1.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
class Day1:
input = """1918
1869
1821
1852
1981
1987
1989
1597
1634
1537
1991
1603
1543
1949
1879
1800
1761
2010
1810
1458
1755
1938
1500
2005
818
1493
1618
1923
1283
1952
1373
1605
1230
1321
1873
1853
1886
1372
1913
1871
159
733
1400
1880
1462
2007
1801
1982
1728
1640
1442
1525
1953
1791
1906
1946
1641
2009
1627
1935
1936
1908
1826
1291
1978
1884
1799
1464
1538
1365
1678
1872
1964
1863
1388
1912
1928
1471
1632
1336
1396
1948
1974
1331
1290
1992
1096
1889
1874
1341
757
1351
1876
1674
2002
1504
1865
1469
1792
1920
1925
1898
1899
1435
405
1488
1319
1322
1749
1867
1957
1944
1727
1293
1739
1285
1917
1897
1844
1966
1921
1905
1830
1484
1364
1782
1415
1412
1413
833
1857
1370
1890
1393
1262
1311
2008
1545
1896
1362
1862
1617
1864
608
1868
1689
1784
1806
1976
1870
1973
1993
1986
1998
1414
1858
1990
1841
1895
1779
1850
2001
1590
1902
1487
943
1808
782
1546
2004
1656
154
1661
1688
1731
1466
1927
1438
1387
1576
1793
1797
1979
1903
1638
1940
1911
1301
1669
1409
1578
1887
1860
1619
1939
1625
1941
1374
1766
1407""".split()
def __init__(self):
for i in self.input:
outer = int(i)
for y in self.input:
inner = int(y)
if (outer + inner) == 2020:
print("Results: {}".format(outer * inner))
Day1()