結果

問題 No.1534 おなかがいたい
ユーザー 👑 rin204
提出日時 2021-08-05 13:28:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 146 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 82,444 KB
実行使用メモリ 54,496 KB
最終ジャッジ日時 2024-09-16 15:20:29
合計ジャッジ時間 1,990 ms
ジャッジサーバーID
(参考情報)
judge2 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
if "pain" not in S:
    print(-1)
    exit()
S = S.split("pain")[0]
x = S.count("pon")
if x <= 1:
    print(-1)
else:
    print(x - 1)
0