Submission #2407490


Source Code Expand

T = int(input())
src = [input() for i in range(T)]
for s in src:
    i = 0
    ans = 0
    while i+5 <= len(s):
        if s[i:i+5] in ('tokyo','kyoto'):
            ans += 1
            i += 5
        else:
            i += 1
    print(ans)

Submission Info

Submission Time
Task A - 東京都
User prd_xxx
Language Python (3.4.3)
Score 100
Code Size 252 Byte
Status AC
Exec Time 20 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 20 ms 3060 KB
20_noised_tokyoto.txt AC 20 ms 3060 KB
99_teuchi.txt AC 18 ms 3060 KB