結果

問題 No.342 一番ワロタww
ユーザー rickythetarickytheta
提出日時 2016-02-12 22:32:03
言語 Ruby
(3.3.0)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 365 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 11,388 KB
実行使用メモリ 15,272 KB
最終ジャッジ日時 2023-08-05 16:04:31
合計ジャッジ時間 2,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,176 KB
testcase_01 AC 80 ms
15,160 KB
testcase_02 AC 77 ms
15,144 KB
testcase_03 AC 78 ms
15,128 KB
testcase_04 AC 80 ms
15,200 KB
testcase_05 AC 79 ms
15,188 KB
testcase_06 AC 82 ms
15,116 KB
testcase_07 AC 82 ms
15,104 KB
testcase_08 AC 79 ms
15,176 KB
testcase_09 AC 77 ms
15,192 KB
testcase_10 AC 78 ms
15,012 KB
testcase_11 AC 77 ms
15,208 KB
testcase_12 AC 77 ms
15,052 KB
testcase_13 AC 79 ms
15,268 KB
testcase_14 AC 77 ms
15,152 KB
testcase_15 AC 77 ms
15,272 KB
testcase_16 AC 79 ms
15,272 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
res = 0
cur = 0
tmp = ""
lst = []
for i in 0...s.length
  c = s[i]
  if c.ord == "w".ord || c.ord == 33431
    if tmp!=""
      cur += 1
      if cur>res
        res = cur
        lst = [tmp.dup]
      elsif cur==res
        lst.push tmp.dup
      end
    end
  else
    if cur!=0
      tmp = ""
    end
    cur = 0
    tmp += c
  end
end
puts lst
0