This commit is contained in:
Justin Lin
2026-05-02 15:42:52 +10:00
commit 8582780ac9
38 changed files with 460 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import re
t = int(input())
a = [input() for _ in range(t)]
# Continue your code here and print your final answer!
patterns = {
"hiss": re.compile("^hiss+$"),
"trill": re.compile("^tri+ll+$"),
"burble": re.compile("^bu+r+bl+e$"),
}
for line in a:
found = False
for name in patterns:
if patterns[name].match(line):
print(name)
found = True
break
if not found:
print("human noises")