First test of day 1

This commit is contained in:
Ethanell 2019-12-01 14:49:42 +01:00
commit b42354d1c8
2 changed files with 105 additions and 0 deletions

5
2019/day 1/day1.py Normal file
View file

@ -0,0 +1,5 @@
modules = open("input.txt").read().split("\n")[:-1]
requirement = 0
for i in modules:
requirement+=(int(i)//3)-2
print(requirement)

100
2019/day 1/input.txt Normal file
View file

@ -0,0 +1,100 @@
60052
61005
114258
66223
114571
80949
129508
94463
134331
102634
148109
109532
60479
68048
71553
68053
51105
149024
138472
57246
85686
121267
144206
104420
149858
137795
121637
68877
51560
74506
83362
53806
132871
100629
76102
103594
68425
54734
124930
120598
136375
146892
90876
131455
124377
125244
144563
107469
86940
132916
79789
136359
105127
82810
83751
107741
51677
113598
119741
105174
128151
82407
108461
50594
92897
146520
56176
68640
124300
88250
132105
89023
80532
120433
50015
84028
100491
53131
135920
108820
98932
109750
136854
126902
108231
109391
136727
128359
108575
114594
131466
89977
124467
114318
84544
53584
87786
131991
138445
70673