結果
問題 | No.1534 おなかがいたい |
ユーザー |
|
提出日時 | 2021-06-06 18:02:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 44 ms / 2,000 ms |
コード長 | 148 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 53,248 KB |
最終ジャッジ日時 | 2024-11-23 01:47:16 |
合計ジャッジ時間 | 2,161 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
S = input() if "pain" not in S: print(-1) exit() i = S.index("pain") c = S[:i].count("pon") if c < 2: print(-1) else: print(c - 1)