結果

問題 No.3020 サンシャイン◯崎
ユーザー koba-e964koba-e964
提出日時 2017-03-31 22:44:37
言語 Ruby
(3.3.0)
結果
AC  
実行時間 111 ms / 1,000 ms
コード長 229 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 15,644 KB
最終ジャッジ日時 2023-08-25 01:58:13
合計ジャッジ時間 3,009 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,032 KB
testcase_01 AC 85 ms
15,172 KB
testcase_02 AC 82 ms
15,088 KB
testcase_03 AC 80 ms
15,112 KB
testcase_04 AC 80 ms
15,032 KB
testcase_05 AC 111 ms
15,612 KB
testcase_06 AC 79 ms
15,052 KB
testcase_07 AC 79 ms
15,032 KB
testcase_08 AC 91 ms
15,352 KB
testcase_09 AC 91 ms
15,448 KB
testcase_10 AC 105 ms
15,324 KB
testcase_11 AC 101 ms
15,500 KB
testcase_12 AC 105 ms
15,584 KB
testcase_13 AC 106 ms
15,548 KB
testcase_14 AC 104 ms
15,568 KB
testcase_15 AC 100 ms
15,528 KB
testcase_16 AC 101 ms
15,584 KB
testcase_17 AC 102 ms
15,532 KB
testcase_18 AC 105 ms
15,332 KB
testcase_19 AC 107 ms
15,644 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
a = Array.new(5, 0)
tbl = {'Y' => 0, 'E' => 1, 'A' => 2, 'H' => 3, '!' => 4}
for i in 0 ... s.length
  c = s[i]
  a[tbl[c]] += 1
end
for i in 0 .. 4
  print a[i]
  if i == 4
    puts
  else
    print " "
  end
end
0