2020 Day 06

This commit is contained in:
Luke Hubmayer-Werner 2020-12-11 22:02:35 +10:30
parent e984119fb3
commit 4070fc0558
2 changed files with 2050 additions and 0 deletions

4
2020/day06.py Normal file
View File

@ -0,0 +1,4 @@
with open('input06', 'r') as file:
groups = [[set(s) for s in g.split('\n')] for g in file.read().strip().split('\n\n')]
print(f'Part 1: {sum(len(set.union(*g)) for g in groups)}')
print(f'Part 2: {sum(len(set.intersection(*g)) for g in groups)}')

2046
2020/input06 Normal file

File diff suppressed because it is too large Load Diff