結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2018-10-26 13:44:55 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 199 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-19 06:03:19 |
合計ジャッジ時間 | 2,438 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 14 |
コンパイルメッセージ
Syntax OK
ソースコード
text = gets # text = "wwwwww" text = text.gsub(/^[w]+/, "") w_array = text.scan(/[w]+/) if text == "" or w_array.length == 0 p "" return 0 end max_w = w_array.sort_by(&:length).last.length for word in text.scan(/[^w]+[w]{#{max_w}}/) p word.gsub(/[w]+/, "") end