結果

問題 No.342 一番ワロタww
ユーザー keikei
提出日時 2018-10-26 17:44:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 416 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 10,964 KB
実行使用メモリ 9,112 KB
最終ジャッジ日時 2023-08-12 07:34:33
合計ジャッジ時間 1,672 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
9,032 KB
testcase_01 AC 25 ms
9,048 KB
testcase_02 AC 26 ms
8,976 KB
testcase_03 AC 25 ms
9,072 KB
testcase_04 AC 25 ms
9,048 KB
testcase_05 AC 25 ms
9,080 KB
testcase_06 AC 25 ms
8,976 KB
testcase_07 AC 25 ms
8,964 KB
testcase_08 AC 25 ms
8,976 KB
testcase_09 AC 24 ms
9,004 KB
testcase_10 AC 24 ms
8,980 KB
testcase_11 AC 24 ms
9,112 KB
testcase_12 AC 26 ms
8,996 KB
testcase_13 AC 25 ms
9,028 KB
testcase_14 AC 25 ms
9,000 KB
testcase_15 AC 25 ms
9,072 KB
testcase_16 AC 25 ms
9,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#  Yukicoder 342
import re
from itertools import takewhile
s = input()
ws = re.split('w(?=[^w]|$)', s)
ws = ws[:-1]
ws = list(filter(lambda w: len(w) and w[0] != 'w', ws))
ws = list(map(lambda w: (w + 'w').partition('w'), ws))
ws = list(sorted(ws, key=lambda p: len(p[2]), reverse=True))
ws = list(takewhile(lambda p: len(p[2]) == len(ws[0][2]), ws))
ws = list(map(lambda p: p[0], ws))
list(map(print, ws))
0