結果
| 問題 | No.345 最小チワワ問題 |
| コンテスト | |
| ユーザー |
mesh1nek0x0
|
| 提出日時 | 2018-07-28 11:45:45 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 152 bytes |
| 記録 | |
| コンパイル時間 | 261 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 15,104 KB |
| 最終ジャッジ日時 | 2026-03-27 03:42:55 |
| 合計ジャッジ時間 | 3,073 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 14 |
コンパイルメッセージ
Main.rb:9: warning: ambiguous first argument; put parentheses or a space even after `-` operator Syntax OK
ソースコード
#!/bin/ruby
S = gets.chomp
cwws = S.scan(/c.*?w.*?w.*?/)
if cwws.any?
cwws.sort { |a, b| a.size <=> b.size }
puts cwws[0].length
else
puts -1
end
mesh1nek0x0