結果

問題 No.3020 サンシャイン◯崎
ユーザー kusagame12kusagame12
提出日時 2023-11-05 18:43:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 292 ms / 1,000 ms
コード長 825 bytes
コンパイル時間 3,544 ms
コンパイル使用メモリ 89,144 KB
実行使用メモリ 60,436 KB
最終ジャッジ日時 2023-11-05 18:44:08
合計ジャッジ時間 8,443 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
57,544 KB
testcase_01 AC 129 ms
57,648 KB
testcase_02 AC 136 ms
57,792 KB
testcase_03 AC 130 ms
57,676 KB
testcase_04 AC 131 ms
57,640 KB
testcase_05 AC 292 ms
60,344 KB
testcase_06 AC 137 ms
57,788 KB
testcase_07 AC 137 ms
57,812 KB
testcase_08 AC 223 ms
57,696 KB
testcase_09 AC 223 ms
57,668 KB
testcase_10 AC 264 ms
60,004 KB
testcase_11 AC 259 ms
60,436 KB
testcase_12 AC 268 ms
59,972 KB
testcase_13 AC 258 ms
60,104 KB
testcase_14 AC 264 ms
59,996 KB
testcase_15 AC 292 ms
60,388 KB
testcase_16 AC 256 ms
60,220 KB
testcase_17 AC 262 ms
60,096 KB
testcase_18 AC 256 ms
59,896 KB
testcase_19 AC 278 ms
60,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        
        StringBuilder ikezaki = new StringBuilder();
        while(sc.hasNext()){
            ikezaki.append(sc.next());
        }
        
        Map<Character , Integer> YEAH = new LinkedHashMap<>();
        YEAH.put('Y',0);
        YEAH.put('E',0);
        YEAH.put('A',0);
        YEAH.put('H',0);
        YEAH.put('!',0);
        for(int i = 0 ; i < ikezaki.length() ; i++){
            char c = ikezaki.charAt(i);
            YEAH.put(c , YEAH.get(c) + 1);
        }
        
        for(Map.Entry<Character, Integer> entry : YEAH.entrySet()){
           System.out.print(entry.getValue()+" ");
        }
        System.out.println();
        
    }
}
0