結果
| 問題 | No.342 一番ワロタww |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-13 00:00:17 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 93 ms / 5,000 ms |
| コード長 | 785 bytes |
| 記録 | |
| コンパイル時間 | 115 ms |
| コンパイル使用メモリ | 77,496 KB |
| 最終ジャッジ日時 | 2025-12-03 19:19:09 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#!/usr/bin/env python
#coding:utf8
def read():
return raw_input().decode('utf-8')
def work(s):
ansList = []
maxLeng = 0
idx = len(s) - 1
while idx >= 0:
cnt = 0
while idx >= 0 and s[idx] == 'w'.decode('utf-8'):
cnt += 1
idx -= 1
toPush = ''
while idx >= 0 and s[idx] != 'w'.decode('utf-8'):
toPush += s[idx]
idx -= 1
toPush = toPush[::-1].encode('utf-8')
if cnt == 0 or len(toPush) == 0:
continue
if maxLeng < cnt:
ansList = [toPush]
maxLeng = cnt
elif maxLeng == cnt:
ansList.append(toPush)
print "\n".join(ansList[::-1])
if __name__ == "__main__":
work(read())