結果

問題 No.342 一番ワロタww
ユーザー nanaenanae
提出日時 2017-03-23 03:17:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 454 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 10,648 KB
実行使用メモリ 7,912 KB
最終ジャッジ日時 2023-08-05 16:28:43
合計ジャッジ時間 1,325 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,912 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 16 ms
7,744 KB
testcase_03 AC 15 ms
7,836 KB
testcase_04 AC 16 ms
7,828 KB
testcase_05 AC 15 ms
7,784 KB
testcase_06 AC 15 ms
7,852 KB
testcase_07 AC 16 ms
7,828 KB
testcase_08 AC 15 ms
7,784 KB
testcase_09 AC 15 ms
7,912 KB
testcase_10 AC 15 ms
7,744 KB
testcase_11 AC 16 ms
7,912 KB
testcase_12 AC 15 ms
7,912 KB
testcase_13 AC 15 ms
7,816 KB
testcase_14 AC 15 ms
7,740 KB
testcase_15 AC 15 ms
7,772 KB
testcase_16 AC 15 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input().lstrip('w')
Ss = S.split('w')

Ss.pop()

max_w = 0
ans = []

for i in range(len(Ss)):
    if Ss[i] == '':
        continue
    else:
        tmp = 0
        for j in range(i + 1, len(Ss)):
            if Ss[j] != '':
                break
            tmp += 1
        if tmp == max_w:
            ans.append(Ss[i])
        elif tmp > max_w:
            max_w = tmp
            ans = []
            ans.append(Ss[i])

print(*ans, sep='\n')
0