結果

問題 No.279 木の数え上げ
ユーザー ぴろずぴろず
提出日時 2015-09-18 22:22:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 296 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 2,369 ms
コンパイル使用メモリ 74,684 KB
実行使用メモリ 45,716 KB
最終ジャッジ日時 2024-04-22 15:59:21
合計ジャッジ時間 6,965 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
41,240 KB
testcase_01 AC 123 ms
41,272 KB
testcase_02 AC 112 ms
39,920 KB
testcase_03 AC 117 ms
40,856 KB
testcase_04 AC 106 ms
40,064 KB
testcase_05 AC 111 ms
39,780 KB
testcase_06 AC 123 ms
41,132 KB
testcase_07 AC 121 ms
40,984 KB
testcase_08 AC 111 ms
40,020 KB
testcase_09 AC 104 ms
41,096 KB
testcase_10 AC 262 ms
45,536 KB
testcase_11 AC 205 ms
42,960 KB
testcase_12 AC 267 ms
45,228 KB
testcase_13 AC 197 ms
42,344 KB
testcase_14 AC 296 ms
45,660 KB
testcase_15 AC 269 ms
45,420 KB
testcase_16 AC 252 ms
45,108 KB
testcase_17 AC 296 ms
45,692 KB
testcase_18 AC 253 ms
44,200 KB
testcase_19 AC 295 ms
45,716 KB
testcase_20 AC 276 ms
45,704 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no279;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int[] count = new int[256];
		for(int i=0;i<s.length();i++) {
			count[s.charAt(i)]++;
		}
		int ans = count['t'];
		ans = Math.min(ans,count['r']);
		ans = Math.min(ans, count['e']/2);
		System.out.println(ans);
	}
}
0