結果
問題 | No.8081 HQ9+ |
ユーザー |
|
提出日時 | 2021-04-15 09:51:56 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 151 bytes |
コンパイル時間 | 92 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-01 09:18:37 |
合計ジャッジ時間 | 3,266 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 1 |
other | AC * 15 WA * 6 |
コンパイルメッセージ
Main.rb:5: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:9: warning: ambiguous first argument; put parentheses or a space even after `-' operator Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n=gets.to_is=gets.chompc=s.count 'Q'if s.include?('H')p -1;exitenda=s.chars.each_slice(c).to_aif a.any?{|e|e!=a[0]}p -1;exitendputs 'Q'*c