結果

問題 No.3020 サンシャイン◯崎
ユーザー kusagame12kusagame12
提出日時 2023-11-05 18:42:59
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 843 bytes
コンパイル時間 2,386 ms
コンパイル使用メモリ 87,212 KB
実行使用メモリ 61,376 KB
最終ジャッジ日時 2023-11-05 18:43:08
合計ジャッジ時間 8,327 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

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.getKey()+":"+entry.getValue()+" ");
        }
        System.out.println();
        
    }
}
0