結果

問題 No.279 木の数え上げ
ユーザー nCk_cvnCk_cv
提出日時 2015-11-28 00:43:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 277 ms / 2,000 ms
コード長 475 bytes
コンパイル時間 2,163 ms
コンパイル使用メモリ 75,444 KB
実行使用メモリ 49,040 KB
最終ジャッジ日時 2024-04-22 16:12:58
合計ジャッジ時間 6,713 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
39,852 KB
testcase_01 AC 110 ms
40,948 KB
testcase_02 AC 108 ms
41,208 KB
testcase_03 AC 110 ms
40,824 KB
testcase_04 AC 108 ms
41,020 KB
testcase_05 AC 109 ms
40,820 KB
testcase_06 AC 92 ms
39,548 KB
testcase_07 AC 116 ms
41,024 KB
testcase_08 AC 113 ms
41,056 KB
testcase_09 AC 97 ms
40,036 KB
testcase_10 AC 271 ms
49,028 KB
testcase_11 AC 181 ms
42,992 KB
testcase_12 AC 233 ms
48,532 KB
testcase_13 AC 184 ms
42,220 KB
testcase_14 AC 274 ms
48,924 KB
testcase_15 AC 256 ms
48,724 KB
testcase_16 AC 253 ms
48,300 KB
testcase_17 AC 277 ms
48,888 KB
testcase_18 AC 231 ms
46,060 KB
testcase_19 AC 260 ms
49,040 KB
testcase_20 AC 257 ms
48,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.Map.Entry;
import java.math.*;
import java.awt.geom.*;
import java.io.*;
      
      
public class Main {	

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] S = sc.next().toCharArray();
		int T = 0;
		int R = 0;
		int E = 0;
		for(int i = 0; i < S.length; i++) {
			if(S[i] == 't') T++;
			if(S[i] == 'r') R++;
			if(S[i] == 'e') E++;
		}
		System.out.println(Math.min(Math.min(T, R), E/2));
	}
}
0