結果
| 問題 | 
                            No.279 木の数え上げ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             samplelpmas
                         | 
                    
| 提出日時 | 2016-12-17 09:52:01 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 325 ms / 2,000 ms | 
| コード長 | 490 bytes | 
| コンパイル時間 | 2,080 ms | 
| コンパイル使用メモリ | 74,828 KB | 
| 実行使用メモリ | 61,376 KB | 
| 最終ジャッジ日時 | 2024-12-14 04:16:49 | 
| 合計ジャッジ時間 | 7,412 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 21 | 
ソースコード
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(charCount['t'], Math.min(charCount['r'], (charCount['e'] / 2)));
        System.out.println(treeMax);
    }
}
            
            
            
        
            
samplelpmas