Submission #5240736
Source Code Expand
T = int(input()) for _ in range (T): S =input() count = 0 count_counter = 0 for i in range (len(S)-5+1): if count_counter >=1 and count_counter <4: count_counter +=1 elif count_counter ==4: count_counter =0 elif (S[i:i+5] == 'kyoto' or S[i:i+5]=='tokyo'): count +=1 count_counter = 1 print(count)
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | oyoroco |
Language | Python (3.4.3) |
Score | 100 |
Code Size | 419 Byte |
Status | AC |
Exec Time | 22 ms |
Memory | 3064 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 | 21 ms | 3064 KB |
20_noised_tokyoto.txt | AC | 22 ms | 3060 KB |
99_teuchi.txt | AC | 19 ms | 3060 KB |