結果

問題 No.279 木の数え上げ
ユーザー samplelpmas
提出日時 2016-12-17 09:45:51
言語 Java
(openjdk 23)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 2,261 ms
コンパイル使用メモリ 74,712 KB
実行使用メモリ 61,576 KB
最終ジャッジ日時 2024-12-14 04:16:25
合計ジャッジ時間 8,027 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        char[] INPUT_STRING = sc.next().toCharArray();

        int[] charCount = new int[123];

        for (int i = 0; i < INPUT_STRING.length; i++) {
            charCount[INPUT_STRING[i]]++;
        }

        int treeMax = Math.min(Math.min(charCount['t'], charCount['r']), (charCount['e'] / 2));

        System.out.println(treeMax);

    }

}
0