Submission #5320610


Source Code Expand

T = int(input())
S = [ input() for _ in range(T)]

for s in S:
    count = 0
    while True:
        result = []
        
        tokyo_index = s.find('tokyo')
        if tokyo_index >= 0:
            result.append(tokyo_index)
        kyoto_index = s.find('kyoto')
        if kyoto_index >= 0:
            result.append(kyoto_index)
        
        if len(result) == 0:
            break
        s = s[(min(result)+5):]
        count += 1

    print(count)
        
        

Submission Info

Submission Time
Task A - 東京都
User yyaammaa
Language Python (3.4.3)
Score 100
Code Size 500 Byte
Status AC
Exec Time 19 ms
Memory 3060 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 3
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 18 ms 3060 KB
20_noised_tokyoto.txt AC 19 ms 3060 KB
99_teuchi.txt AC 18 ms 3060 KB