結果

問題 No.342 一番ワロタww
コンテスト
ユーザー 👑 kmjp
提出日時 2016-02-12 23:34:25
言語 PyPy2
(7.3.20)
コンパイル:
pypy2 -m py_compile _filename_
実行:
/usr/bin/pypy2 Main.pyc
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 541 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 69 ms
コンパイル使用メモリ 62,964 KB
実行使用メモリ 62,696 KB
最終ジャッジ日時 2026-10-29 00:42:55
合計ジャッジ時間 2,999 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import math
import codecs

sys.stdin  = codecs.getreader('utf-8')(sys.stdin)
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)


S=raw_input().strip()
while S.startswith(u"w"):
	S = S[1:]

L=[]
for c in S:
	if len(L)==0:
		L.append(c)
	else:
		if (c==u"w") ^ (L[-1].find(u"w")==-1):
			L[-1] += c
		else:
			L.append(c)

ma=0
for c in L:
	if c.find(u"w")!=-1:
		ma = max(ma,len(c))


for i in range(len(L)):
	c = L[i]
	if c.find(u"w")!=-1 and len(c) == ma:
		print L[i-1]
0