結果

問題 No.279 木の数え上げ
ユーザー phsplsphspls
提出日時 2020-03-28 10:22:01
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 66 ms / 2,000 ms
コード長 383 bytes
コンパイル時間 3,561 ms
コンパイル使用メモリ 104,520 KB
実行使用メモリ 27,724 KB
最終ジャッジ日時 2023-08-30 17:28:51
合計ジャッジ時間 4,961 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
22,576 KB
testcase_01 AC 51 ms
22,608 KB
testcase_02 AC 50 ms
20,552 KB
testcase_03 AC 50 ms
20,536 KB
testcase_04 AC 50 ms
20,540 KB
testcase_05 AC 50 ms
22,612 KB
testcase_06 AC 49 ms
20,472 KB
testcase_07 AC 49 ms
20,520 KB
testcase_08 AC 49 ms
20,556 KB
testcase_09 AC 50 ms
22,464 KB
testcase_10 AC 64 ms
25,404 KB
testcase_11 AC 54 ms
21,048 KB
testcase_12 AC 60 ms
25,732 KB
testcase_13 AC 51 ms
20,488 KB
testcase_14 AC 64 ms
25,816 KB
testcase_15 AC 63 ms
24,772 KB
testcase_16 AC 61 ms
24,328 KB
testcase_17 AC 65 ms
27,484 KB
testcase_18 AC 57 ms
22,892 KB
testcase_19 AC 63 ms
25,256 KB
testcase_20 AC 66 ms
27,724 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.Linq;

public class P0279 {
    public static void Main() {
        var t = 0;
        var r = 0;
        var e = 0;
        foreach(char c in Console.ReadLine().Trim().ToCharArray()) {
            if (c == 't') t++;
            if (c == 'r') r++;
            if (c == 'e') e++;
        }
        Console.WriteLine(Math.Min(Math.Min(t, r), e / 2));
    }
}
0