Submission #3247130


Source Code Expand

using System;
using System.Linq;//リストの使用
using System.Collections.Generic;
class Program
{
	static void Main()
	{
  int answer = 0;
	int t = int.Parse(Console.ReadLine());//int.Parseは文字列を整数に変換。
    for(int i = 0; i < t; i++)
    {
    string input = Console.ReadLine();
    answer = 0;

      for(int j = 0; j < input.Length - 5; j++)
      {
        if(input[j] == 'k' && input[j+1] == 'y' && input[j+2] == 'o' &&
         input[j+3] == 't' && input[j+4] == 'o')
        {
        answer ++;
        j+=4;
        }
        if(input[j] == 't' && input[j+1] == 'o' && input[j+2] == 'k' &&
         input[j+3] == 'y' && input[j+4] == 'o')
        {
        answer ++;
        j+=4;
        }
      }
    Console.WriteLine(answer);
    }
	}
}

Submission Info

Submission Time
Task A - 東京都
User suikameron
Language C# (Mono 4.6.2.0)
Score 0
Code Size 808 Byte
Status WA
Exec Time 21 ms
Memory 13140 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 20 ms 9044 KB
20_noised_tokyoto.txt WA 21 ms 13140 KB
99_teuchi.txt WA 20 ms 9044 KB