2020/Day 6/one.py

18 lines
317 B
Python
Raw Permalink Normal View History

2022-07-01 15:56:12 +02:00
#!/bin/python
with open("input", "r") as input:
sum = 0
answers = set()
for line in input:
line = line.strip()
if line == "":
sum += len(answers)
answers = set()
for char in line:
answers.add(char)
sum += len(answers)
print(sum)