結果

問題 No.279 木の数え上げ
ユーザー tentententen
提出日時 2020-11-11 09:07:37
言語 Java21
(openjdk 21)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 396 bytes
コンパイル時間 2,196 ms
コンパイル使用メモリ 71,784 KB
実行使用メモリ 65,204 KB
最終ジャッジ日時 2023-09-30 00:23:11
合計ジャッジ時間 7,941 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,652 KB
testcase_01 AC 124 ms
55,684 KB
testcase_02 AC 128 ms
55,680 KB
testcase_03 AC 126 ms
55,736 KB
testcase_04 AC 125 ms
55,520 KB
testcase_05 AC 127 ms
55,796 KB
testcase_06 AC 123 ms
55,908 KB
testcase_07 AC 126 ms
55,792 KB
testcase_08 AC 128 ms
55,820 KB
testcase_09 AC 128 ms
55,796 KB
testcase_10 AC 312 ms
63,444 KB
testcase_11 AC 215 ms
58,156 KB
testcase_12 AC 305 ms
63,208 KB
testcase_13 AC 215 ms
56,568 KB
testcase_14 MLE -
testcase_15 AC 293 ms
63,160 KB
testcase_16 AC 308 ms
63,048 KB
testcase_17 MLE -
testcase_18 AC 249 ms
58,828 KB
testcase_19 AC 361 ms
63,564 KB
testcase_20 AC 309 ms
63,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] counts = new int[26];
        for (char c : sc.next().toCharArray()) {
            counts[c - 'a']++;
        }
        int ans = Math.min(Math.min(counts['t' - 'a'], counts['r' - 'a']), counts['e' - 'a'] / 2);
        System.out.println(ans);
    }
}
0