Task: | Ethernet cable |
Sender: | Ace of Spades |
Submission time: | 2016-05-28 15:28:12 +0300 |
Language: | Python2 |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.05 s | details |
Code
def Ts(S): L = [1,0,0,0,0] for i in S: if i == "H": L[1] += L[0] elif i == "I": L[3] += L[2] L[2] += L[1] elif i == "T": L[4] += L[3] return L[4] def main(): t = int(raw_input()) res = [] for i in range(t): res.append(str( Ts(raw_input()) )) print "\n".join(res) main()