結果

問題 No.3020 サンシャイン◯崎
ユーザー ぴろずぴろず
提出日時 2017-03-31 23:09:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 209 ms / 1,000 ms
コード長 472 bytes
コンパイル時間 2,168 ms
コンパイル使用メモリ 72,060 KB
実行使用メモリ 56,352 KB
最終ジャッジ日時 2023-08-25 02:02:08
合計ジャッジ時間 6,903 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,340 KB
testcase_01 AC 123 ms
55,124 KB
testcase_02 AC 125 ms
55,676 KB
testcase_03 AC 122 ms
55,384 KB
testcase_04 AC 120 ms
55,376 KB
testcase_05 AC 209 ms
56,352 KB
testcase_06 AC 122 ms
55,576 KB
testcase_07 AC 122 ms
55,808 KB
testcase_08 AC 172 ms
56,024 KB
testcase_09 AC 172 ms
55,924 KB
testcase_10 AC 206 ms
56,328 KB
testcase_11 AC 200 ms
56,264 KB
testcase_12 AC 201 ms
56,100 KB
testcase_13 AC 206 ms
56,144 KB
testcase_14 AC 209 ms
56,108 KB
testcase_15 AC 205 ms
56,236 KB
testcase_16 AC 201 ms
56,164 KB
testcase_17 AC 207 ms
55,956 KB
testcase_18 AC 208 ms
56,076 KB
testcase_19 AC 207 ms
56,188 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no3020;

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] s = sc.next().toCharArray();
		int[] count = new int[128];
		for(char c: s) {
			count[c]++;
		}
		StringBuilder sb = new StringBuilder();
		String y = "YEAH!";
		for(int i=0;i<y.length();i++) {
			if (i > 0) {
				sb.append(' ');
			}
			sb.append(count[y.charAt(i)]);
		}
		System.out.println(sb.toString());
	}

}
0