Submission #2166687
Source Code Expand
# -*- coding: utf-8 -*- def inpl(): return list(map(int, input().split())) T = int(input()) S = [input() for _ in range(T)] for s in S: s = s.replace("to", "A").replace("kyo", "B") U = "" for u in s: if u == "A" or u == "B": U += u res = 0 i = 0 while i < len(U) - 1: if U[i:i+2] == "AB" or U[i:i+2] == "BA": res += 1 i += 2 else: i += 1 print(res)
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | nadare881 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 466 Byte |
Status | WA |
Exec Time | 20 ms |
Memory | 3064 KB |
Judge Result
Set Name | All | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
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 | 3064 KB |
20_noised_tokyoto.txt | WA | 19 ms | 3064 KB |
99_teuchi.txt | WA | 18 ms | 3064 KB |