Submission #2140471
Source Code Expand
import re T = int(input()) S = [] for i in range(T): S.append(input()) for i in range(T): ans = 0 if(len(S[i]) >= 5): head = 0 while head <= len(S[i]) - 4: if r"tokyo"==S[i][head:head+5] or "kyoto"==S[i][head:head+5]: ans += 1 head += 4 head = head + 1 print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | atsu_c |
Language | Python (3.4.3) |
Score | 100 |
Code Size | 371 Byte |
Status | AC |
Exec Time | 27 ms |
Memory | 3316 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | 10_random_to_kyo.txt, 20_noised_tokyoto.txt, 99_teuchi.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
10_random_to_kyo.txt | AC | 27 ms | 3316 KB |
20_noised_tokyoto.txt | AC | 23 ms | 3188 KB |
99_teuchi.txt | AC | 21 ms | 3188 KB |