結果

問題 No.418 ミンミンゼミ
ユーザー 14番14番
提出日時 2016-09-10 06:18:13
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 73 ms / 1,000 ms
コード長 1,466 bytes
コンパイル時間 2,120 ms
コンパイル使用メモリ 103,768 KB
実行使用メモリ 23,340 KB
最終ジャッジ日時 2023-09-23 00:51:41
合計ジャッジ時間 5,005 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
23,200 KB
testcase_01 AC 73 ms
23,172 KB
testcase_02 AC 71 ms
21,112 KB
testcase_03 AC 72 ms
21,032 KB
testcase_04 AC 71 ms
21,200 KB
testcase_05 AC 71 ms
21,192 KB
testcase_06 AC 71 ms
19,232 KB
testcase_07 AC 72 ms
23,236 KB
testcase_08 AC 72 ms
23,276 KB
testcase_09 AC 73 ms
21,252 KB
testcase_10 AC 72 ms
21,096 KB
testcase_11 AC 72 ms
21,200 KB
testcase_12 AC 72 ms
21,108 KB
testcase_13 AC 71 ms
23,340 KB
testcase_14 AC 72 ms
21,140 KB
testcase_15 AC 72 ms
21,196 KB
testcase_16 AC 72 ms
21,008 KB
testcase_17 AC 72 ms
21,300 KB
testcase_18 AC 71 ms
23,084 KB
testcase_19 AC 72 ms
23,112 KB
testcase_20 AC 72 ms
21,180 KB
testcase_21 AC 72 ms
21,172 KB
testcase_22 AC 72 ms
23,140 KB
testcase_23 AC 72 ms
23,232 KB
testcase_24 AC 71 ms
21,044 KB
testcase_25 AC 71 ms
21,280 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;
using System.Text;
using System.Linq;



class Program
{
    public void Proc()
    {
        Reader.IsDebug = false;
        string inpt = Reader.ReadLine();
        int idx = 0;
        int ans = 0;
        int pos = inpt.IndexOf("mi");
        while(pos >= 0) {
            idx = pos + 2;
            pos = -1;
            for(int i=idx; i<inpt.Length; i++) {
                if(inpt[i] == '-') {
                    continue;
                } else if(inpt[i] == 'n') {
                    pos = inpt.IndexOf("mi", i);                    
                    ans++;
                    break;
                } else {
                    break;
                }
            }
        } 
        Console.WriteLine(ans);

    }

    public class Reader
    {
        public static bool IsDebug = true;
        private static String PlainInput = @"

mi--nminminminmi-------n



";
        private static System.IO.StringReader Sr = null;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (Sr == null)
                {
                    Sr = new System.IO.StringReader(PlainInput.Trim());
                }
                return Sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
    }
    static void Main()
    {
        Program prg = new Program();
        prg.Proc();
    }
}
0