Submission #533065


Source Code Expand

#!/usr/bin/env python
# -*- coding: utf-8 -*-

T = int(input())
for t in range(T):
    S = input()
    ans = 0
    S1 = S.replace("kyoto", "1")
    S1 = S1.replace("tokyo", "0")
    ans += S1.count("1")
    ans += S1.count("0")

    tmp = 0
    S2 = S.replace("tokyo", "0")
    S2 = S2.replace("kyoto", "1")
    tmp += S2.count("1")
    tmp += S2.count("0")
    print(max(ans,tmp))

Submission Info

Submission Time
Task A - 東京都
User emon
Language Python (3.4.2)
Score 0
Code Size 400 Byte
Status WA
Exec Time 1061 ms
Memory 7144 KB

Judge Result

Set Name All
Score / Max Score 0 / 100
Status
WA × 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 WA 1061 ms 7144 KB
20_noised_tokyoto.txt WA 93 ms 6884 KB
99_teuchi.txt WA 95 ms 6724 KB