You are viewing a single comment's thread. Return to all comments →
Very pretty and concise! I did the same thing, but a bit more verbose since I'm still getting used to python coming from c-esque syntax.
n = int(raw_input()) for i in range(n): if i == 0: gems = set(raw_input()) else: gems = gems.intersection(set(raw_input())) print len(gems)
Seems like cookies are disabled on this browser, please enable them to open this website
Gemstones
You are viewing a single comment's thread. Return to all comments →
Very pretty and concise! I did the same thing, but a bit more verbose since I'm still getting used to python coming from c-esque syntax.