initial commit
This commit is contained in:
commit
27fe77bbe1
134 changed files with 21939 additions and 0 deletions
2178
2020/Day6/input.txt
Normal file
2178
2020/Day6/input.txt
Normal file
File diff suppressed because it is too large
Load diff
25
2020/Day6/main.py
Normal file
25
2020/Day6/main.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
if __name__ == '__main__':
|
||||
with open("input.txt") as f:
|
||||
raw = f.read().split("\n\n")
|
||||
|
||||
groups = []
|
||||
for i in raw:
|
||||
groups.append(i.split("\n"))
|
||||
|
||||
counter = 0
|
||||
people = 0
|
||||
answer = 0
|
||||
|
||||
for group in groups:
|
||||
curransw = []
|
||||
people = 0
|
||||
for answergroup in group:
|
||||
people += 1
|
||||
for answer in answergroup:
|
||||
curransw.append(answer)
|
||||
|
||||
if curransw.count(answer) == people:
|
||||
counter += 1
|
||||
|
||||
|
||||
print(counter)
|
||||
Loading…
Add table
Add a link
Reference in a new issue