You are viewing a single comment's thread. Return to all comments →
nyünyünyű vau:
import re from collections import Counter word_regex = re.compile(r'[a-zA-Z0-9_]+') n = int(input()) word_counter = Counter() for _ in range(n): word_counter.update(word_regex.findall(input())) t = int(input()) for _ in range(t): print(word_counter[input()])
Seems like cookies are disabled on this browser, please enable them to open this website
Find a Word
You are viewing a single comment's thread. Return to all comments →
nyünyünyű vau: