結果

問題 No.279 木の数え上げ
ユーザー FVRChanFVRChan
提出日時 2017-10-02 21:37:13
言語 Java21
(openjdk 21)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 404 bytes
コンパイル時間 2,136 ms
コンパイル使用メモリ 74,524 KB
実行使用メモリ 64,252 KB
最終ジャッジ日時 2024-04-27 18:17:25
合計ジャッジ時間 6,520 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
52,680 KB
testcase_01 AC 103 ms
52,488 KB
testcase_02 AC 114 ms
53,972 KB
testcase_03 AC 103 ms
52,516 KB
testcase_04 AC 114 ms
53,988 KB
testcase_05 AC 115 ms
53,556 KB
testcase_06 AC 101 ms
52,504 KB
testcase_07 AC 96 ms
52,524 KB
testcase_08 AC 108 ms
53,488 KB
testcase_09 AC 115 ms
53,852 KB
testcase_10 AC 287 ms
61,652 KB
testcase_11 AC 210 ms
56,848 KB
testcase_12 AC 271 ms
61,548 KB
testcase_13 AC 174 ms
54,684 KB
testcase_14 MLE -
testcase_15 AC 274 ms
62,040 KB
testcase_16 AC 258 ms
62,032 KB
testcase_17 AC 366 ms
62,020 KB
testcase_18 AC 236 ms
59,496 KB
testcase_19 AC 261 ms
61,592 KB
testcase_20 AC 269 ms
61,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		int t=0,r=0,e=0;
		char are[]=sc.nextLine().toCharArray();
		for(char element:are){
			switch(element){
			case't':t++;break;
			case'r':r++;break;
			case'e':e++;break;
			}
		}
		int min=Math.min(Math.min(t,r),e/2);
		System.out.println(min);
	}
}
0