Submission #3904291
Source Code Expand
import sys def input(): return sys.stdin.readline() T = int(input()) for _ in range(T): s = input() s = s.replace('to', '0') s = s.replace('kyo', '1') pre = '' ans = 0 for i in s: if (i == '0' and pre == '1') or (i == '1' and pre == '0'): ans += 1 pre = '' else: pre = i print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | Tallfall |
Language | Python (3.4.3) |
Score | 100 |
Code Size | 378 Byte |
Status | AC |
Exec Time | 20 ms |
Memory | 3064 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 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 | 3060 KB |
20_noised_tokyoto.txt | AC | 20 ms | 3064 KB |
99_teuchi.txt | AC | 19 ms | 3060 KB |