Submission #1189804
Source Code Expand
using System; class A { static void Main() { int a = int.Parse(Console.ReadLine()); for (int t = 0; t < a; t++) { string s = Console.ReadLine(); if (s.Length >= 5) { int ans = 0; for (int i = 0; i < s.Length - 4; i++) { string d = s.Substring(i, 5); if (d == "tokyo" || d == "kyoto") { ans++; i += 4; } } Console.WriteLine(ans); } else { Console.WriteLine("0"); } }Console.ReadLine(); } }
Submission Info
Submission Time | |
---|---|
Task | A - 東京都 |
User | rayhotate |
Language | C# (Mono 4.6.2.0) |
Score | 100 |
Code Size | 634 Byte |
Status | AC |
Exec Time | 21 ms |
Memory | 13140 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 | 21 ms | 9044 KB |
20_noised_tokyoto.txt | AC | 21 ms | 9044 KB |
99_teuchi.txt | AC | 21 ms | 13140 KB |