結果

問題 No.342 一番ワロタww
ユーザー ldsyb
提出日時 2016-04-26 19:25:16
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 234 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-10-04 15:56:15
合計ジャッジ時間 1,937 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other AC * 1 WA * 13
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:16: warning: assigned but unused variable - wsrart
Syntax OK

ソースコード

diff #

s = gets.chop
maxcount = 0
wstart = 0
wend = 0
tmp = 0
i = 0

while i < s.size
	if s[i] == "w"
		tmp += 1
		if maxcount < tmp
			maxcount = tmp
			wend = i - 1
		end
	else
		wsrart = i
		tmp = 0
	end
	i += 1
end

puts s[wstart,wend]
0