結果

問題 No.3081 HQ9+
ユーザー maimai
提出日時 2021-04-01 22:12:23
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 119 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 11,452 KB
実行使用メモリ 20,424 KB
最終ジャッジ日時 2023-08-23 06:11:39
合計ジャッジ時間 3,085 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,068 KB
testcase_01 AC 80 ms
15,040 KB
testcase_02 AC 81 ms
15,156 KB
testcase_03 AC 80 ms
15,288 KB
testcase_04 AC 84 ms
15,108 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 84 ms
15,272 KB
testcase_15 AC 84 ms
15,100 KB
testcase_16 AC 84 ms
15,284 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:8: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

gets
li = gets.chomp
abort unless li=~/^[A-Za-z]+$/
abort if li=~/H/
if li=~/^[^HQ]*Q[^HQ]*$/
  puts li
else
  p -1
end
0