17 lines
317 B
Python
Executable file
17 lines
317 B
Python
Executable file
#!/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)
|
|
|