結果

問題 No.342 一番ワロタww
コンテスト
ユーザー convexineq
提出日時 2021-01-14 06:58:49
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 32 ms / 5,000 ms
+ 465µs
コード長 480 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 95 ms
コンパイル使用メモリ 64,572 KB
実行使用メモリ 53,728 KB
最終ジャッジ日時 2026-10-29 01:19:56
合計ジャッジ時間 2,246 ms
ジャッジサーバーID
(参考情報)
judge7_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

s = input()
while s and s[0]=="w": s = s[1:]
res = []
now = ""
c = 0
for i in s:
    if i != "w":
        if c:
            res.append(c)
            c = 0
        now += i
    else:
        if now:
            res.append(now)
            now = ""
        c += 1
if now: res.append(now)
if c: res.append(c)

ans = []
num = 0
for i,j in zip(res[::2],res[1::2]):
    if num < j:
        ans = [i]
        num = j
    elif num==j:
        ans.append(i)
for i in ans:
    print(i)
0