結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
latte0119
|
| 提出日時 | 2016-02-24 15:28:19 |
| 言語 | Ruby (3.4.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 541 bytes |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-22 13:19:49 |
| 合計ジャッジ時間 | 2,325 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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(0)
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
latte0119