Submission #3002531


Source Code Expand

using System;
using System.Collections.Generic;
using System.Text;

namespace AtTest.Library.RangeScheduling
{
    class KUPC_A
    {
        static void Main(string[] args)
        {
            Method(args);
            Console.ReadLine();
        }

        static void Method(string[] args)
        {
            int t = int.Parse(Console.ReadLine());
            var strs = new string[t];
            for (int i = 0; i < t; i++)
            {
                strs[i] = Console.ReadLine();
            }

            for(int i = 0; i < t; i++)
            {
                int cnt = 0;
                for (int j = 0; j <= strs[i].Length - 5; j++)
                {
                    if (strs[i][j] == 't')
                    {
                        if (strs[i].Substring(j + 1, 4).Equals("okyo"))
                        {
                            cnt++;
                            j += 5;
                        }
                    }
                    else if (strs[i][j] == 'k')
                    {
                        if (strs[i].Substring(j + 1, 4).Equals("yoto"))
                        {
                            cnt++;
                            j += 5;
                        }
                    }
                }

                Console.WriteLine(cnt);
            }
        }
    }
}

Submission Info

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