結果

問題 No.342 一番ワロタww
ユーザー hanorver
提出日時 2016-02-12 23:00:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 452 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-10-15 13:12:25
合計ジャッジ時間 1,265 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

str = input()

d = {}
s = ""
count = 0

for i in str:
    if i != 'w' and count == 0:
        s += i
    elif i == 'w':
        count += 1
    else:
        if s == "":
            pass
        else:
            d[s] = count
        s = i
        count = 0
else:
    d[s] = count
m = 0

for key, val in d.items():
    m = max(m, val)

if not d or m == 0:
    print()
else:
    for key, val in d.items():
        if val == m:
            print(key)
0