結果

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

テストケース

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

ソースコード

diff #

s = input()
while s and s[0] == "w": s = s[1:]
ans = []
mxc = 0
curc = 0
sent = ""
for si in s:
    if si == "w":
        if sent:
            if curc == mxc:
                ans.append(sent)
            elif curc > mxc:
                ans = [sent]
            mxc = max(mxc, curc)
            curc = 0
            sent = ""
        else:
            curc += 1
    else:
        sent += si

for a in ans:
    print(a)    
0