結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2018-10-26 13:44:18 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 68 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-11-19 06:03:16 |
合計ジャッジ時間 | 2,072 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 14 |
コンパイルメッセージ
Syntax OK
ソースコード
text = gets.chomp # 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