結果
問題 | No.8020 サンシャイン◯崎 |
ユーザー | shinwisteria |
提出日時 | 2017-03-31 22:34:24 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 331 ms / 1,000 ms |
コード長 | 547 bytes |
コンパイル時間 | 3,637 ms |
コンパイル使用メモリ | 76,472 KB |
実行使用メモリ | 43,264 KB |
最終ジャッジ日時 | 2024-12-23 13:59:36 |
合計ジャッジ時間 | 9,536 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
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(); } }