結果

問題 No.418 ミンミンゼミ
ユーザー shimadandyshimadandy
提出日時 2016-09-21 18:59:00
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 754 bytes
コンパイル時間 1,982 ms
コンパイル使用メモリ 102,056 KB
実行使用メモリ 23,304 KB
最終ジャッジ日時 2023-09-23 01:00:06
合計ジャッジ時間 5,110 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
23,252 KB
testcase_01 AC 72 ms
21,136 KB
testcase_02 AC 74 ms
21,176 KB
testcase_03 AC 74 ms
21,316 KB
testcase_04 AC 75 ms
21,324 KB
testcase_05 AC 75 ms
21,152 KB
testcase_06 AC 74 ms
21,232 KB
testcase_07 AC 74 ms
21,268 KB
testcase_08 AC 74 ms
23,188 KB
testcase_09 AC 75 ms
23,180 KB
testcase_10 AC 74 ms
21,144 KB
testcase_11 AC 73 ms
21,216 KB
testcase_12 AC 74 ms
23,216 KB
testcase_13 AC 74 ms
21,204 KB
testcase_14 AC 74 ms
23,304 KB
testcase_15 AC 75 ms
21,216 KB
testcase_16 AC 74 ms
21,216 KB
testcase_17 AC 73 ms
23,180 KB
testcase_18 AC 73 ms
21,132 KB
testcase_19 AC 72 ms
19,148 KB
testcase_20 AC 74 ms
21,336 KB
testcase_21 AC 73 ms
23,180 KB
testcase_22 AC 73 ms
21,156 KB
testcase_23 AC 73 ms
23,168 KB
testcase_24 AC 73 ms
21,208 KB
testcase_25 AC 73 ms
23,304 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;

class Program
{
    /// <summary>
    /// プログラムのエントリポイント
    /// </summary>
    /// <param name="args"></param>
    static void Main(string[] args)
    {
        string s = Console.ReadLine().Replace("-", "");

        int mincount = 0;
        int searchIndex = 0;
        while(true)
        {
            if(s.IndexOf("min", searchIndex) >= 0)
            {
                if (searchIndex + 3 >= s.Length)
                    mincount++;
                else if (s[searchIndex + 3] == 'm')
                    mincount++;

                searchIndex += 3;
                continue;
            }

            break;
        }

        Console.WriteLine(mincount);
    }
}
0