結果

問題 No.342 一番ワロタww
ユーザー convexineqconvexineq
提出日時 2021-01-14 06:58:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 5,000 ms
コード長 480 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 71,588 KB
最終ジャッジ日時 2023-08-15 11:47:14
合計ジャッジ時間 2,403 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,464 KB
testcase_01 AC 60 ms
71,224 KB
testcase_02 AC 61 ms
71,580 KB
testcase_03 AC 61 ms
71,400 KB
testcase_04 AC 60 ms
71,536 KB
testcase_05 AC 62 ms
71,072 KB
testcase_06 AC 63 ms
71,464 KB
testcase_07 AC 64 ms
71,488 KB
testcase_08 AC 63 ms
71,536 KB
testcase_09 AC 63 ms
71,588 KB
testcase_10 AC 64 ms
71,436 KB
testcase_11 AC 62 ms
71,488 KB
testcase_12 AC 63 ms
71,536 KB
testcase_13 AC 66 ms
71,516 KB
testcase_14 AC 63 ms
71,068 KB
testcase_15 AC 63 ms
71,564 KB
testcase_16 AC 62 ms
71,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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