結果

問題 No.3020 サンシャイン◯崎
ユーザー maimai
提出日時 2017-03-31 22:53:26
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 270 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 11,408 KB
実行使用メモリ 17,252 KB
最終ジャッジ日時 2023-08-25 02:00:23
合計ジャッジ時間 2,717 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 81 ms
15,156 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp!

if s =~ /Y+/
    puts s.size+" 0 0 0 0"
    exit
end
_e = s.index('E')
_e = 0 unless _e
_a = s.index('A',_e+1)
_a = _e unless _a
_h = s.index('H',_a+1)
_h = _a unless _h
_b = s.index('!',_h+1)
_b = _h unless _b

puts [_e,_a-_e,_h-_a,_b-_h,s.size-_b]*" "
0