結果

問題 No.342 一番ワロタww
ユーザー Yuki_UtaaiYuki_Utaai
提出日時 2018-02-17 16:29:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 959 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 11,040 KB
実行使用メモリ 8,076 KB
最終ジャッジ日時 2023-09-06 17:48:25
合計ジャッジ時間 1,282 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,940 KB
testcase_01 AC 15 ms
7,992 KB
testcase_02 AC 15 ms
7,936 KB
testcase_03 AC 16 ms
8,068 KB
testcase_04 WA -
testcase_05 AC 15 ms
8,076 KB
testcase_06 AC 15 ms
7,900 KB
testcase_07 AC 14 ms
7,908 KB
testcase_08 AC 15 ms
8,048 KB
testcase_09 AC 15 ms
7,912 KB
testcase_10 AC 15 ms
7,948 KB
testcase_11 AC 15 ms
7,960 KB
testcase_12 AC 15 ms
7,924 KB
testcase_13 AC 16 ms
7,908 KB
testcase_14 AC 15 ms
7,912 KB
testcase_15 AC 15 ms
7,908 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def 草判定(文字列):
    文字列の長さ=len(文字列)
    wの前の文字列=""
    解答=[]
    wカウント, wカウント最大値=0, 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]
        else:
            wカウント=wカウント+1
    解答の長さ=len(解答)
    for i in range(解答の長さ):
        print(解答[i])

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