Submission #5293899


Source Code Expand

T = int(input())
case = ["tokyo","kyoto"]
for i in range(T):
    count = 0
    S = str(input())
    for j in range(len(S),0,-1):
        if S[j-5:j] == case[0] or S[j-5:j] == case[1]:
            count += 1
            S = S[:j-5]
    print(count)

Submission Info

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