結果

問題 No.3020 サンシャイン◯崎
ユーザー kusagame12kusagame12
提出日時 2023-11-05 18:45:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 297 ms / 1,000 ms
コード長 863 bytes
コンパイル時間 2,701 ms
コンパイル使用メモリ 77,448 KB
実行使用メモリ 60,080 KB
最終ジャッジ日時 2023-11-05 18:45:22
合計ジャッジ時間 8,219 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
57,704 KB
testcase_01 AC 133 ms
57,520 KB
testcase_02 AC 137 ms
57,808 KB
testcase_03 AC 131 ms
57,472 KB
testcase_04 AC 129 ms
57,624 KB
testcase_05 AC 269 ms
59,992 KB
testcase_06 AC 137 ms
57,804 KB
testcase_07 AC 136 ms
57,492 KB
testcase_08 AC 216 ms
57,828 KB
testcase_09 AC 229 ms
57,704 KB
testcase_10 AC 263 ms
60,000 KB
testcase_11 AC 297 ms
60,016 KB
testcase_12 AC 262 ms
60,080 KB
testcase_13 AC 268 ms
60,028 KB
testcase_14 AC 252 ms
60,008 KB
testcase_15 AC 264 ms
60,024 KB
testcase_16 AC 256 ms
60,048 KB
testcase_17 AC 255 ms
59,840 KB
testcase_18 AC 264 ms
59,992 KB
testcase_19 AC 262 ms
59,988 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