You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
304 B
19 lines
304 B
4 years ago
|
#!/usr/bin/env python3
|
||
|
|
||
|
from sys import argv
|
||
|
|
||
|
i = [x.strip().split("\n") for x in open(argv[1]).read().split("\n\n")]
|
||
|
|
||
|
ok = 0
|
||
|
ok2 = 0
|
||
|
for g in i:
|
||
|
ci = set(g[0])
|
||
|
cx = set(g[0])
|
||
|
for p in g[1:]:
|
||
|
ci |= set(p)
|
||
|
cx &= set(p)
|
||
|
ok += len(ci)
|
||
|
ok2 += len(cx)
|
||
|
print(ok)
|
||
|
print(ok2)
|