結果
| 問題 |
No.342 一番ワロタww
|
| コンテスト | |
| ユーザー |
kmjp
|
| 提出日時 | 2016-02-12 23:36:40 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 5,000 ms |
| コード長 | 515 bytes |
| コンパイル時間 | 200 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2024-10-15 13:14:49 |
| 合計ジャッジ時間 | 995 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#!/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 or ((c==u"w") ^ (L[-1].find(u"w")!=-1)):
L.append(c)
else:
L[-1] += 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]
kmjp