結果

問題 No.279 木の数え上げ
ユーザー ぴろず
提出日時 2015-09-18 22:22:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 280 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 4,513 ms
コンパイル使用メモリ 84,260 KB
実行使用メモリ 57,176 KB
最終ジャッジ日時 2024-10-14 15:06:13
合計ジャッジ時間 7,859 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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