結果

問題 No.279 木の数え上げ
ユーザー Tsukasa_Type
提出日時 2018-02-09 17:09:21
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 391 bytes
コンパイル時間 2,304 ms
コンパイル使用メモリ 74,932 KB
実行使用メモリ 57,284 KB
最終ジャッジ日時 2024-10-07 16:29:53
合計ジャッジ時間 7,727 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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