結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2021-08-05 13:28:34 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 69 ms / 2,000 ms |
| + 793µs | |
| コード長 | 146 bytes |
| 記録 | |
| コンパイル時間 | 249 ms |
| コンパイル使用メモリ | 96,616 KB |
| 実行使用メモリ | 79,488 KB |
| 最終ジャッジ日時 | 2026-08-28 20:42:26 |
| 合計ジャッジ時間 | 3,082 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
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)