結果

問題 No.342 一番ワロタww
ユーザー TatsunoTatsuno
提出日時 2016-02-12 23:31:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 726 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 11,872 KB
実行使用メモリ 10,072 KB
最終ジャッジ日時 2023-10-22 03:35:13
合計ジャッジ時間 1,204 ms
ジャッジサーバーID
(参考情報)
judge12 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,024 KB
testcase_01 AC 26 ms
10,024 KB
testcase_02 AC 26 ms
10,024 KB
testcase_03 AC 33 ms
10,024 KB
testcase_04 AC 28 ms
10,024 KB
testcase_05 AC 27 ms
10,024 KB
testcase_06 WA -
testcase_07 AC 27 ms
10,024 KB
testcase_08 WA -
testcase_09 AC 26 ms
10,024 KB
testcase_10 AC 27 ms
10,024 KB
testcase_11 AC 26 ms
10,024 KB
testcase_12 AC 25 ms
10,024 KB
testcase_13 AC 26 ms
10,024 KB
testcase_14 AC 24 ms
10,024 KB
testcase_15 AC 25 ms
10,024 KB
testcase_16 AC 27 ms
10,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def get_num(s):
    c = "w"
    n = 0
    m = 0
    for e,v in enumerate(s):
        if v == c:
            m += 1
        else:
            m = 0
        if m > n:
            n = m
    return n

def main():
    s = input()
    s_ = s
    for i,c in enumerate(s):
        if c == "w":
            s_ = s[i+1:]
        else:
            break;
    s = s_

    if 'w' not in s:
        print("")
        return

    sep = "w"*get_num(s)
    ans = []
    if sep == "":
        print("")
        return

    for a in s.split(sep):
        if a != '':
            ans.append(a.split("w")[-1])
    if ans == []:
        print("")
    else:
        for a in ans:
            print(a)

if __name__ == "__main__":
    main()
0