結果

問題 No.279 木の数え上げ
ユーザー kmtrc130kmtrc130
提出日時 2019-03-18 15:43:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 103 ms / 2,000 ms
コード長 479 bytes
コンパイル時間 2,220 ms
コンパイル使用メモリ 104,252 KB
実行使用メモリ 26,684 KB
最終ジャッジ日時 2023-09-25 13:09:00
合計ジャッジ時間 5,158 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
21,324 KB
testcase_01 AC 55 ms
23,248 KB
testcase_02 AC 55 ms
21,240 KB
testcase_03 AC 56 ms
23,400 KB
testcase_04 AC 55 ms
23,472 KB
testcase_05 AC 54 ms
21,328 KB
testcase_06 AC 54 ms
21,344 KB
testcase_07 AC 54 ms
21,272 KB
testcase_08 AC 54 ms
21,416 KB
testcase_09 AC 54 ms
19,160 KB
testcase_10 AC 98 ms
22,316 KB
testcase_11 AC 65 ms
21,520 KB
testcase_12 AC 84 ms
23,140 KB
testcase_13 AC 60 ms
23,192 KB
testcase_14 AC 102 ms
24,708 KB
testcase_15 AC 94 ms
24,080 KB
testcase_16 AC 90 ms
23,624 KB
testcase_17 AC 98 ms
24,320 KB
testcase_18 AC 77 ms
22,656 KB
testcase_19 AC 99 ms
24,228 KB
testcase_20 AC 103 ms
26,684 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;

class Program
{
    public void Solve()
    {
        string S = Console.ReadLine();

        int[] cnt = new int[3];
        cnt[0] = S.Count(x => x == 't');
        cnt[1] = S.Count(x => x == 'r');
        cnt[2] = S.Count(x => x == 'e') / 2;

        Array.Sort(cnt);

        Console.WriteLine(cnt[0]);
    }

    static void Main()
    {
        var solver = new Program();
        solver.Solve();
    }
}
0