結果

問題 No.418 ミンミンゼミ
ユーザー funakoshifunakoshi
提出日時 2019-06-28 11:02:34
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 1,039 bytes
コンパイル時間 1,904 ms
コンパイル使用メモリ 99,984 KB
実行使用メモリ 22,616 KB
最終ジャッジ日時 2023-09-14 21:13:31
合計ジャッジ時間 4,638 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,452 KB
testcase_01 AC 51 ms
20,516 KB
testcase_02 AC 51 ms
22,508 KB
testcase_03 AC 51 ms
22,612 KB
testcase_04 AC 50 ms
20,564 KB
testcase_05 AC 51 ms
20,520 KB
testcase_06 AC 51 ms
20,508 KB
testcase_07 AC 51 ms
20,560 KB
testcase_08 AC 52 ms
20,516 KB
testcase_09 AC 52 ms
20,528 KB
testcase_10 AC 52 ms
22,552 KB
testcase_11 AC 51 ms
20,596 KB
testcase_12 AC 51 ms
20,688 KB
testcase_13 AC 51 ms
18,580 KB
testcase_14 AC 51 ms
22,548 KB
testcase_15 AC 51 ms
20,512 KB
testcase_16 AC 50 ms
20,688 KB
testcase_17 AC 48 ms
20,664 KB
testcase_18 AC 50 ms
20,688 KB
testcase_19 AC 50 ms
20,496 KB
testcase_20 AC 51 ms
22,616 KB
testcase_21 AC 51 ms
22,532 KB
testcase_22 AC 51 ms
20,584 KB
testcase_23 AC 50 ms
22,616 KB
testcase_24 AC 51 ms
18,512 KB
testcase_25 AC 51 ms
20,568 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.Linq;
using System.Text;
using System.Threading.Tasks;

namespace yukicoderTest
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            int mcnt = 0;
            int icnt = 0;
            int ncnt = 0;
            int min = 0;
            for (int i = 0; i < input.Length; i++)
            {
                string temp = input.Substring(i, 1);
                if(temp=="m")
                {
                    mcnt++;
                }
                else if(temp=="i")
                {
                    icnt++;
                }
                else if(temp=="n")
                {
                    ncnt++;
                }
                if(mcnt==1&&icnt==1&&ncnt==1)
                {
                    min++;
                    mcnt--;
                    icnt--;
                    ncnt--;
                }
            }
            Console.WriteLine(min);
        }

    }
}
0