結果

問題 No.279 木の数え上げ
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 15:24:20
言語 Java21
(openjdk 21)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 463 bytes
コンパイル時間 2,805 ms
コンパイル使用メモリ 74,588 KB
実行使用メモリ 65,432 KB
最終ジャッジ日時 2024-04-27 15:24:06
合計ジャッジ時間 8,537 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
54,064 KB
testcase_01 AC 112 ms
53,956 KB
testcase_02 AC 121 ms
53,580 KB
testcase_03 AC 99 ms
52,784 KB
testcase_04 AC 119 ms
53,860 KB
testcase_05 AC 123 ms
54,136 KB
testcase_06 AC 111 ms
53,244 KB
testcase_07 AC 111 ms
53,748 KB
testcase_08 AC 116 ms
53,980 KB
testcase_09 AC 100 ms
52,792 KB
testcase_10 MLE -
testcase_11 AC 234 ms
58,588 KB
testcase_12 AC 329 ms
63,640 KB
testcase_13 AC 189 ms
57,608 KB
testcase_14 MLE -
testcase_15 AC 355 ms
54,472 KB
testcase_16 AC 321 ms
53,100 KB
testcase_17 AC 370 ms
55,192 KB
testcase_18 AC 284 ms
49,380 KB
testcase_19 AC 373 ms
55,404 KB
testcase_20 AC 431 ms
54,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String s = sc.next(), t, r, e;
		int ans = s.length()/4;
		t = s.replaceAll("t", "");
		r = s.replaceAll("r", "");
		e = s.replaceAll("e", "");
		ans = Math.min(ans, s.length()-t.length());
		ans = Math.min(ans, s.length()-r.length());
		ans = Math.min(ans, (s.length()-e.length())/2);
		System.out.println(ans);

		sc.close();
	}
}
0