結果
問題 | No.279 木の数え上げ |
ユーザー | kohaku_kohaku |
提出日時 | 2016-11-12 20:30:02 |
言語 | Java21 (openjdk 21) |
結果 |
MLE
|
実行時間 | - |
コード長 | 598 bytes |
コンパイル時間 | 2,566 ms |
コンパイル使用メモリ | 72,072 KB |
実行使用メモリ | 130,868 KB |
最終ジャッジ日時 | 2023-08-17 03:55:35 |
合計ジャッジ時間 | 11,659 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 124 ms
55,984 KB |
testcase_01 | AC | 123 ms
55,784 KB |
testcase_02 | AC | 122 ms
56,156 KB |
testcase_03 | AC | 124 ms
56,092 KB |
testcase_04 | AC | 136 ms
55,752 KB |
testcase_05 | AC | 126 ms
55,900 KB |
testcase_06 | AC | 126 ms
55,668 KB |
testcase_07 | AC | 125 ms
55,664 KB |
testcase_08 | AC | 123 ms
56,212 KB |
testcase_09 | AC | 118 ms
55,540 KB |
testcase_10 | MLE | - |
testcase_11 | MLE | - |
testcase_12 | MLE | - |
testcase_13 | MLE | - |
testcase_14 | MLE | - |
testcase_15 | MLE | - |
testcase_16 | MLE | - |
testcase_17 | MLE | - |
testcase_18 | MLE | - |
testcase_19 | MLE | - |
testcase_20 | MLE | - |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String S = sc.next(); String [] arr = S.split(""); int t = 0; int r = 0; int e = 0; for(int i=0; i<arr.length; i++){ if( "t".equals(arr[i]) ){ t++; }else if( "r".equals(arr[i]) ){ r++; }else if( "e".equals(arr[i]) ){ e++; } } int min = Math.min(t, Math.min(r,e/2) ); System.out.println(min); } }