結果

問題 No.342 一番ワロタww
ユーザー hanorverhanorver
提出日時 2016-02-12 23:13:32
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 491 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 8,472 KB
最終ジャッジ日時 2023-08-05 16:05:30
合計ジャッジ時間 1,277 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,360 KB
testcase_01 AC 19 ms
8,420 KB
testcase_02 AC 19 ms
8,360 KB
testcase_03 AC 18 ms
8,324 KB
testcase_04 AC 18 ms
8,472 KB
testcase_05 AC 17 ms
8,380 KB
testcase_06 AC 18 ms
8,468 KB
testcase_07 AC 18 ms
8,412 KB
testcase_08 AC 19 ms
8,400 KB
testcase_09 AC 19 ms
8,360 KB
testcase_10 AC 18 ms
8,336 KB
testcase_11 AC 18 ms
8,328 KB
testcase_12 AC 18 ms
8,328 KB
testcase_13 AC 19 ms
8,412 KB
testcase_14 AC 18 ms
8,472 KB
testcase_15 AC 18 ms
8,368 KB
testcase_16 AC 17 ms
8,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import OrderedDict

str = input()

d = OrderedDict()
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 m == 0:
    print()
else:
    for key, val in d.items():
        if val == m:
            print(key)
0