結果
問題 |
No.342 一番ワロタww
|
ユーザー |
![]() |
提出日時 | 2016-02-24 15:26:17 |
言語 | Ruby (3.4.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 538 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-09-22 13:19:47 |
合計ジャッジ時間 | 2,473 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 RE * 2 |
コンパイルメッセージ
Syntax OK
ソースコード
s=gets tmp=s.count('w') if tmp==0||tmp==s.size then print "\n" exit end while s[0]=='w' do s=s[1,s.size-1] end while s[s.size-1]!='w' do s=s[0,s.size-1] end ma=0 lis=[] while s.size!=0 do c=0 while c<s.size&&s[c]!='w' do c+=1 end ss=s[0,c] s=s[c,s.size-c] c=0 while c<s.size&&s[c]=='w' do c+=1 end s=s[c,s.size-c] if ma<c then lis=[ss] ma=c elsif ma==c then lis.push(ss) end end for e in lis print e+"\n" end