結果

問題 No.3020 サンシャイン◯崎
ユーザー 37zigen37zigen
提出日時 2017-03-31 22:36:28
言語 Java19
(openjdk 21)
結果
AC  
実行時間 234 ms / 1,000 ms
コード長 647 bytes
コンパイル時間 2,218 ms
コンパイル使用メモリ 75,096 KB
実行使用メモリ 57,304 KB
最終ジャッジ日時 2023-08-25 01:57:46
合計ジャッジ時間 6,968 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
56,184 KB
testcase_01 AC 128 ms
56,004 KB
testcase_02 AC 135 ms
56,016 KB
testcase_03 AC 132 ms
55,720 KB
testcase_04 AC 134 ms
55,928 KB
testcase_05 AC 228 ms
56,496 KB
testcase_06 AC 135 ms
56,068 KB
testcase_07 AC 140 ms
55,832 KB
testcase_08 AC 198 ms
56,400 KB
testcase_09 AC 199 ms
56,504 KB
testcase_10 AC 234 ms
57,128 KB
testcase_11 AC 229 ms
56,968 KB
testcase_12 AC 231 ms
57,252 KB
testcase_13 AC 230 ms
56,788 KB
testcase_14 AC 225 ms
56,976 KB
testcase_15 AC 225 ms
57,084 KB
testcase_16 AC 219 ms
57,304 KB
testcase_17 AC 228 ms
56,464 KB
testcase_18 AC 233 ms
56,740 KB
testcase_19 AC 213 ms
57,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		char[] s = { 'Y', 'E', 'A', 'H', '!' };
		String o = sc.next();
		int[] cnt = new int[s.length];
		for (int i = 0; i < o.length(); ++i) {
			for (int j = 0; j < s.length; ++j) {
				if (s[j] == o.charAt(i)) {
					++cnt[j];
				}
			}
		}
		for (int i = 0; i < cnt.length; ++i) {
			System.out.print(cnt[i] + " ");
		}
		System.out.println();
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}
0