結果
| 問題 | 
                            No.342 一番ワロタww
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-02-14 16:38:52 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 84 ms / 5,000 ms | 
| コード長 | 288 bytes | 
| コンパイル時間 | 235 ms | 
| コンパイル使用メモリ | 7,296 KB | 
| 実行使用メモリ | 12,288 KB | 
| 最終ジャッジ日時 | 2024-10-15 13:20:49 | 
| 合計ジャッジ時間 | 2,325 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 | 
コンパイルメッセージ
Syntax OK
ソースコード
s=gets
ac=0
fr=''
last=false
ls = []
for i in 0...s.size
  if s[i] == 'w'
    ac += 1
    last = true
  else
    if last and fr!=''
      ls << [ac, fr]
      ac=0
      fr=''
    end
    last=false
    fr += s[i]
  end
end
n = ls.map{|a|a[0]}.max
for x,f in ls
  puts f if n == x
end