結果

問題 No.279 木の数え上げ
ユーザー tenten
提出日時 2020-11-11 09:07:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 272 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 1,785 ms
コンパイル使用メモリ 74,884 KB
実行使用メモリ 48,964 KB
最終ジャッジ日時 2024-07-22 18:20:03
合計ジャッジ時間 6,752 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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