結果

問題 No.1534 おなかがいたい
ユーザー Escaity
提出日時 2021-06-20 19:51:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 257 bytes
コンパイル時間 779 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,264 KB
最終ジャッジ日時 2024-06-22 22:34:30
合計ジャッジ時間 2,103 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

str = input()
p = 0
if "pain" in str:
    idx = str.find("pain")
    str = str[:idx]
    lenS = len(str)
    i = 0
    while i < lenS:

        if str[i : i + 3] == "pon":
            p += 1
            i += 3
        else:
            i += 1

print(p - 1)
0