結果
問題 |
No.8020 サンシャイン◯崎
|
ユーザー |
![]() |
提出日時 | 2025-09-11 10:42:55 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 212 ms / 1,000 ms |
コード長 | 610 bytes |
コンパイル時間 | 2,906 ms |
コンパイル使用メモリ | 77,572 KB |
実行使用メモリ | 49,532 KB |
最終ジャッジ日時 | 2025-09-11 10:43:04 |
合計ジャッジ時間 | 8,175 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String str = scan.nextLine(); int[] countList = {0,0,0,0,0}; for(int i = 0 ; i < str.length() ; i++ ){ switch(str.charAt(i)){ case 'Y': countList[0]++; break; case 'E': countList[1]++; break; case 'A': countList[2]++; break; case 'H': countList[3]++; break; case '!': countList[4]++; break; } } for(int count:countList){ System.out.print(count + " "); } System.out.println(""); } }