Submission #3766610


Source Code Expand

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


for i in range(T):
    ans = 0
    L = len(S[i])
    if L >= 5:
        for l in range(L-4):
            if S[i][l:l+5] == 'tokyo' or S[i][l:l+5] == 'kyoto':
                ans += 1
                S[i] = S[i][:l] + '00000' + S[i][l+5:]
    print(ans)

Submission Info

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