結果

問題 No.342 一番ワロタww
ユーザー nebukuro09
提出日時 2016-10-24 16:18:05
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 5,000 ms
コード長 527 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 6,784 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2024-10-15 13:26:27
合計ジャッジ時間 925 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import sys, codecs
sys.stdin  = codecs.getreader('utf-8')(sys.stdin)
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
import re
S = raw_input()
sp1 = filter(None, re.split(u'w+', S))
sp2 = map(len, filter(None, re.split(u'[^w]+', S)))
if len(sp1) == 0 or len(sp2) == 0:
    print ''
    exit()
if S.startswith(u'w'):
    sp2.pop(0)
if not S.endswith(u'w'):
    sp2.append(0)
m = max(sp2)
if m == 0:
    print ''
    exit()
for i in xrange(len(sp1)):
    if sp2[i] == m:
        print sp1[i]
 
0