結果

問題 No.279 木の数え上げ
ユーザー mbanmban
提出日時 2016-11-05 10:36:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 673 bytes
コンパイル時間 2,276 ms
コンパイル使用メモリ 106,000 KB
実行使用メモリ 26,316 KB
最終ジャッジ日時 2023-08-16 13:48:50
合計ジャッジ時間 4,766 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
21,256 KB
testcase_01 AC 52 ms
21,204 KB
testcase_02 AC 52 ms
21,296 KB
testcase_03 AC 52 ms
23,228 KB
testcase_04 AC 53 ms
23,292 KB
testcase_05 AC 52 ms
19,272 KB
testcase_06 AC 52 ms
23,256 KB
testcase_07 AC 53 ms
23,288 KB
testcase_08 AC 53 ms
23,236 KB
testcase_09 AC 53 ms
23,364 KB
testcase_10 AC 65 ms
26,316 KB
testcase_11 AC 55 ms
23,400 KB
testcase_12 AC 62 ms
25,180 KB
testcase_13 AC 54 ms
21,184 KB
testcase_14 AC 66 ms
22,540 KB
testcase_15 AC 64 ms
23,984 KB
testcase_16 AC 64 ms
23,624 KB
testcase_17 AC 66 ms
24,276 KB
testcase_18 AC 60 ms
24,588 KB
testcase_19 AC 67 ms
24,200 KB
testcase_20 AC 66 ms
24,548 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;

class Magatro
{
    static void Main()
    {
        string S = Console.ReadLine();
        int[] tree = new int[3];
       
   for(int i = 0; i < S.Length; i++)
        {
            switch (S[i])
            {
                case 't':
                    tree[0]++;
                    break;
                case 'r':
                    tree[1]++;
                    break;
                case 'e':
                    tree[2]++;
                    break;
            }
        }
        tree[2] /= 2;
        Console.WriteLine(tree.Min());
    }
}
0