結果

問題 No.3020 サンシャイン◯崎
ユーザー shinwisteriashinwisteria
提出日時 2017-03-31 22:34:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 367 ms / 1,000 ms
コード長 547 bytes
コンパイル時間 5,443 ms
コンパイル使用メモリ 73,872 KB
実行使用メモリ 58,252 KB
最終ジャッジ日時 2023-08-25 01:58:54
合計ジャッジ時間 9,803 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
55,708 KB
testcase_01 AC 142 ms
55,768 KB
testcase_02 AC 143 ms
55,836 KB
testcase_03 AC 139 ms
55,836 KB
testcase_04 AC 140 ms
55,824 KB
testcase_05 AC 364 ms
57,448 KB
testcase_06 AC 141 ms
55,800 KB
testcase_07 AC 142 ms
55,636 KB
testcase_08 AC 238 ms
57,360 KB
testcase_09 AC 243 ms
57,588 KB
testcase_10 AC 361 ms
57,460 KB
testcase_11 AC 316 ms
56,916 KB
testcase_12 AC 367 ms
57,328 KB
testcase_13 AC 361 ms
57,572 KB
testcase_14 AC 354 ms
57,236 KB
testcase_15 AC 337 ms
57,232 KB
testcase_16 AC 300 ms
56,908 KB
testcase_17 AC 355 ms
57,200 KB
testcase_18 AC 359 ms
57,348 KB
testcase_19 AC 355 ms
58,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Ikezaki {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		StringBuilder str = new StringBuilder(s.nextLine());
		s.close();
		int[] c = new int[5];
		while(str.length() != 0){
			char t = str.charAt(0);
			if(t == 'Y'){
				c[0]++;
			}else if(t == 'E'){
				c[1]++;
			}else if(t == 'A'){
				c[2]++;
			}else if(t == 'H'){
				c[3]++;
			}else{
				c[4]++;
			}
			str.deleteCharAt(0);
		}
		for(int a:c){
			System.out.print(a + " ");
		}
		System.out.println();

	}

}
0