← Back to List

9342번: 염색체 ↗

Solutions

Python 3
185 B | 185 chars
import re
p= "^([A-F]{0,1})A+F+C+$([A-F]{0,1})"
for i in range(int(input())):  
    s = input()
    if re.match(p,s) != None:
        print("Infected!")
    else:
        print("Good")