結果

問題 No.342 一番ワロタww
コンテスト
ユーザー t98slider
提出日時 2026-10-17 20:16:11
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 379 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 14,720 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2026-10-17 20:16:22
合計ジャッジ時間 2,603 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 17 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

S = input()
i, mx = 0, 0
n = len(S)
stk = ''
ans = []
while i < n:
    p = i
    while i < n and S[i] == S[p]:
        i += 1
    if S[p] == 'w':
        if i - p > mx:
            mx = i - p
            ans.clear()
        if i - p == mx:
            ans.append(stk)
        stk = ''
    else:
        for j in range(p, i):
            stk += S[j]

for s in ans:
    print(s)
0