結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,012 KB
testcase_01 AC 79 ms
15,032 KB
testcase_02 AC 81 ms
15,248 KB
testcase_03 AC 80 ms
15,240 KB
testcase_04 AC 81 ms
15,276 KB
testcase_05 AC 82 ms
15,088 KB
testcase_06 AC 82 ms
15,084 KB
testcase_07 AC 81 ms
15,040 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 80 ms
15,048 KB
testcase_12 AC 82 ms
15,072 KB
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 AC 85 ms
15,356 KB
testcase_18 AC 103 ms
19,792 KB
testcase_19 AC 83 ms
15,568 KB
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.chars.count('Q') > 1
if li=~/^[^HQ]*Q[^HQ]*$/
  puts li
else
  p -1
end
0