結果

問題 No.279 木の数え上げ
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-03 18:01:41
言語 Java21
(openjdk 21)
結果
MLE  
実行時間 -
コード長 609 bytes
コンパイル時間 4,265 ms
コンパイル使用メモリ 75,264 KB
実行使用メモリ 119,472 KB
最終ジャッジ日時 2024-04-16 23:33:54
合計ジャッジ時間 13,750 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
40,892 KB
testcase_01 AC 138 ms
41,188 KB
testcase_02 AC 137 ms
41,408 KB
testcase_03 AC 133 ms
40,908 KB
testcase_04 AC 136 ms
40,984 KB
testcase_05 AC 137 ms
41,376 KB
testcase_06 AC 134 ms
41,164 KB
testcase_07 AC 136 ms
41,288 KB
testcase_08 AC 136 ms
41,316 KB
testcase_09 AC 138 ms
40,884 KB
testcase_10 MLE -
testcase_11 AC 429 ms
57,608 KB
testcase_12 MLE -
testcase_13 AC 353 ms
53,696 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Exercise55{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    String str = sc.next();

    String[] strArray = str.split("");

    int tCount = 0;
    int rCount = 0;
    int eeCount = 0;

    for(int i = 0; i < strArray.length; i++){
      if (strArray[i].equals("t")){
        tCount++;
      }else if (strArray[i].equals("r")){
        rCount++;
      }else if (strArray[i].equals("e")){
        eeCount++;
      }
    }
    eeCount /= 2;
    int min = Math.min(tCount, Math.min(rCount, eeCount));
    System.out.println(min);
  }
}
0