結果

問題 No.279 木の数え上げ
ユーザー omi_UTomi_UT
提出日時 2017-03-10 21:40:37
言語 Java21
(openjdk 21)
結果
AC  
実行時間 159 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 1,895 ms
コンパイル使用メモリ 71,048 KB
実行使用メモリ 55,452 KB
最終ジャッジ日時 2023-09-06 13:20:29
合計ジャッジ時間 4,878 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,464 KB
testcase_01 AC 42 ms
49,200 KB
testcase_02 AC 41 ms
49,208 KB
testcase_03 AC 42 ms
49,236 KB
testcase_04 AC 42 ms
49,412 KB
testcase_05 AC 41 ms
49,664 KB
testcase_06 AC 42 ms
49,028 KB
testcase_07 AC 42 ms
49,452 KB
testcase_08 AC 43 ms
49,408 KB
testcase_09 AC 41 ms
49,140 KB
testcase_10 AC 149 ms
54,960 KB
testcase_11 AC 114 ms
52,448 KB
testcase_12 AC 148 ms
55,208 KB
testcase_13 AC 77 ms
51,996 KB
testcase_14 AC 152 ms
55,236 KB
testcase_15 AC 143 ms
53,168 KB
testcase_16 AC 159 ms
55,068 KB
testcase_17 AC 143 ms
55,452 KB
testcase_18 AC 136 ms
53,036 KB
testcase_19 AC 138 ms
53,388 KB
testcase_20 AC 151 ms
54,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int t = 0;
		int r = 0;
		int e = 0;

		String hoge = br.readLine();
		for(int i=0; i<hoge.length(); i++){
			if(hoge.charAt(i) == 't'){
				t++;
			}else if(hoge.charAt(i) == 'r'){
				r++;
			}else if(hoge.charAt(i) == 'e'){
				e++;
			}
		}

		System.out.println(Math.min(Math.min(t, r), e/2));
	}
}
0