Here is my Python solution:
from collections import Counter with open("input.txt") as f: grps = [x.strip().split() for x in f.read().split("\n\n")] print(sum([len(Counter("".join(g))) for g in grps])) print(sum([len([v for v in Counter("".join(g)).values() if v == len(g)]) for g in grps]))
Github Link
So simple yet so tricky.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here is my Python solution:
Github Link
So simple yet so tricky.