結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
shironeko_shobo
|
| 提出日時 | 2021-01-17 23:15:11 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 147 bytes |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-11-30 05:21:16 |
| 合計ジャッジ時間 | 3,889 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 19 |
コンパイルメッセージ
Main.rb:6: warning: ambiguous first argument; put parentheses or a space even after `-' operator Syntax OK
ソースコード
str = gets.chomp
regex = /c.*w.*w/
cwws = str.scan(regex)
if cwws.empty?
puts -1
return
end
puts(cwws.min { |a, b| a.size <=> b.size }.size)
shironeko_shobo