結果

問題 No.279 木の数え上げ
ユーザー uafr_csuafr_cs
提出日時 2015-09-18 22:24:46
言語 Java21
(openjdk 21)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 532 bytes
コンパイル時間 2,223 ms
コンパイル使用メモリ 79,216 KB
実行使用メモリ 65,384 KB
最終ジャッジ日時 2023-12-14 00:16:47
合計ジャッジ時間 8,056 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,852 KB
testcase_01 AC 129 ms
57,836 KB
testcase_02 AC 127 ms
57,960 KB
testcase_03 AC 128 ms
57,852 KB
testcase_04 AC 129 ms
57,956 KB
testcase_05 AC 131 ms
57,856 KB
testcase_06 AC 133 ms
57,728 KB
testcase_07 AC 129 ms
57,844 KB
testcase_08 AC 131 ms
57,956 KB
testcase_09 AC 128 ms
57,848 KB
testcase_10 MLE -
testcase_11 AC 212 ms
60,188 KB
testcase_12 MLE -
testcase_13 AC 195 ms
58,112 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 AC 246 ms
60,812 KB
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int t_count = 0, r_count = 0, e_count = 0;
		for(final char c : sc.next().toCharArray()){
			switch(c){
			case 't': t_count++; break;
			case 'r': r_count++; break;
			case 'e': e_count++; break;			
			}
		}
		
		
		System.out.println(Math.min(e_count / 2, Math.min(t_count, r_count)));
		
	}

}
0