結果

問題 No.3020 サンシャイン◯崎
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2017-03-31 22:25:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 263 ms / 1,000 ms
コード長 497 bytes
コンパイル時間 2,228 ms
コンパイル使用メモリ 73,420 KB
実行使用メモリ 59,672 KB
最終ジャッジ日時 2023-08-25 01:55:20
合計ジャッジ時間 7,904 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 169 ms
56,824 KB
testcase_01 AC 168 ms
56,716 KB
testcase_02 AC 169 ms
56,740 KB
testcase_03 AC 167 ms
56,940 KB
testcase_04 AC 168 ms
56,748 KB
testcase_05 AC 259 ms
58,900 KB
testcase_06 AC 174 ms
56,760 KB
testcase_07 AC 171 ms
56,720 KB
testcase_08 AC 230 ms
57,376 KB
testcase_09 AC 228 ms
57,112 KB
testcase_10 AC 257 ms
57,904 KB
testcase_11 AC 262 ms
59,672 KB
testcase_12 AC 258 ms
57,008 KB
testcase_13 AC 263 ms
57,616 KB
testcase_14 AC 259 ms
57,232 KB
testcase_15 AC 253 ms
57,716 KB
testcase_16 AC 257 ms
57,892 KB
testcase_17 AC 259 ms
57,460 KB
testcase_18 AC 258 ms
57,920 KB
testcase_19 AC 252 ms
57,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int [] ans = new int [5];
        char [] c = {'Y','E','A','H','!'};
        for(int i=0; i<S.length(); i++){
            char t = S.charAt(i);
            for(int j=0; j<5; j++){
                if(t==c[j])ans[j]++;
            }
        }
        System.out.println(ans[0]+" "+ans[1]+" "+ans[2]+" "+ans[3]+" "+ans[4]);
    }
}
0