結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-24 16:17:29 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 492 bytes |
| コンパイル時間 | 69 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2024-11-24 02:45:14 |
| 合計ジャッジ時間 | 883 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 13 WA * 1 |
ソースコード
# -*- 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)
for i in xrange(len(sp1)):
if sp2[i] == m:
print sp1[i]