結果

問題 No.342 一番ワロタww
ユーザー Yuki_UtaaiYuki_Utaai
提出日時 2018-02-17 17:05:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 1,013 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-23 13:36:45
合計ジャッジ時間 1,675 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

def 草判定(文字列):
    文字列の長さ=len(文字列)
    wの前の文字列=""
    解答=[]
    wカウント, wカウント最大値=0, 0
    a=0

    for i in range(文字列の長さ):
        if 文字列[i]!="w":
            if wカウント>=1:
                if wカウント>wカウント最大値:
                    wカウント最大値=wカウント
                    解答=[]
                    解答.append(wの前の文字列)
                elif wカウント==wカウント最大値:
                    解答.append(wの前の文字列)
                wの前の文字列=""
                wカウント=0
            wの前の文字列=wの前の文字列+文字列[i]
            a=1
        elif 文字列[i]=="w" and a==1:
            wカウント=wカウント+1
    解答の長さ=len(解答)
    for i in range(解答の長さ):
        print(解答[i])

文字列=input()
文字列=文字列+"あ"
草判定(文字列)
0