結果
問題 |
No.8081 HQ9+
|
ユーザー |
|
提出日時 | 2021-04-15 09:54:51 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 154 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-07-01 09:23:19 |
合計ジャッジ時間 | 3,239 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 WA * 3 |
コンパイルメッセージ
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 Syntax OK
ソースコード
n=gets.to_i s=gets.chomp c=s.count 'Q' if s.include?('H')||c<1 p -1;exit end a=s.chars.each_slice(n/c).to_a if a.any?{|e|e!=a[0]} p -1;exit end puts s