結果
| 問題 |
No.345 最小チワワ問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-11 17:33:47 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 184 bytes |
| コンパイル時間 | 603 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-13 20:10:58 |
| 合計ジャッジ時間 | 4,479 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 19 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp
is_exist = false
result = s.length
s.match(/(c.*w.*w)/) do |m|
result = [m.to_s.length,result].min
is_exist = true
end
puts(if !is_exist then -1 else result end)