Skip to content

Commit 41eec4c

Browse files
committed
Solve 9342 of string problems
1 parent 17cf42a commit 41eec4c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

baekjoon/9342/neva/9342.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from sys import stdin
2+
import re
3+
4+
infection_regex = re.compile(r'^[A-F]?A+F+C+[A-F]?$')
5+
6+
for _ in range(int(stdin.readline())):
7+
if infection_regex.match(stdin.readline().strip()):
8+
print("Infected!")
9+
else:
10+
print("Good")

0 commit comments

Comments
 (0)