結果

問題 No.3020 サンシャイン◯崎
ユーザー yagi2yagi2
提出日時 2017-04-25 18:10:51
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 548 bytes
コンパイル時間 2,117 ms
コンパイル使用メモリ 73,800 KB
実行使用メモリ 67,772 KB
最終ジャッジ日時 2023-08-25 02:04:28
合計ジャッジ時間 8,647 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,464 KB
testcase_01 WA -
testcase_02 AC 126 ms
53,556 KB
testcase_03 AC 122 ms
55,672 KB
testcase_04 WA -
testcase_05 AC 376 ms
65,200 KB
testcase_06 AC 125 ms
55,520 KB
testcase_07 AC 126 ms
55,848 KB
testcase_08 AC 267 ms
62,764 KB
testcase_09 AC 285 ms
62,972 KB
testcase_10 AC 372 ms
65,876 KB
testcase_11 AC 358 ms
65,868 KB
testcase_12 AC 368 ms
65,984 KB
testcase_13 AC 395 ms
65,912 KB
testcase_14 AC 377 ms
65,192 KB
testcase_15 AC 375 ms
65,364 KB
testcase_16 AC 364 ms
65,808 KB
testcase_17 AC 385 ms
67,772 KB
testcase_18 AC 387 ms
65,624 KB
testcase_19 AC 373 ms
65,612 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String[] S = sc.next().split("");

        Map<String, Integer> YEAH = new HashMap<>();
        for (String s : S) {
            if (!YEAH.containsKey(s)) YEAH.put(s, 0);
            YEAH.put(s, YEAH.get(s) + 1);
        }

        System.out.printf("%d %d %d %d %d\n", YEAH.get("Y"), YEAH.get("E"), YEAH.get("A"), YEAH.get("H"), YEAH.get("!"));
    }
}
0