17 lines
283 B
Python
17 lines
283 B
Python
|
|
|
|
data = open(0).read().strip()
|
|
|
|
part_2 = False
|
|
r = 0
|
|
words = []
|
|
for line in data.splitlines():
|
|
if part_2:
|
|
words = list(map(lambda w: "".join(sorted(w)), line.split()))
|
|
else:
|
|
words = line.split()
|
|
if len(words) == len(set(words)):
|
|
r += 1
|
|
|
|
print(r)
|