結果

問題 No.342 一番ワロタww
ユーザー cympfhcympfh
提出日時 2016-02-14 16:37:43
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 277 bytes
コンパイル時間 418 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 16,064 KB
最終ジャッジ日時 2023-10-22 05:15:08
合計ジャッジ時間 2,604 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
16,064 KB
testcase_01 AC 85 ms
16,064 KB
testcase_02 AC 89 ms
16,064 KB
testcase_03 AC 88 ms
16,064 KB
testcase_04 WA -
testcase_05 AC 84 ms
16,064 KB
testcase_06 AC 85 ms
16,060 KB
testcase_07 AC 86 ms
16,064 KB
testcase_08 AC 84 ms
16,064 KB
testcase_09 AC 86 ms
16,064 KB
testcase_10 AC 87 ms
16,064 KB
testcase_11 AC 88 ms
16,064 KB
testcase_12 AC 88 ms
16,064 KB
testcase_13 AC 86 ms
16,064 KB
testcase_14 AC 87 ms
16,064 KB
testcase_15 AC 85 ms
16,064 KB
testcase_16 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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
      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
0