結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-07-08 13:16:31 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 23 ms / 2,000 ms |
| + 688µs | |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 57 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2026-10-08 09:06:11 |
| 合計ジャッジ時間 | 2,279 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
import re
import sys
S = input()
if "pain" not in S:
print(-1)
sys.exit()
S = S.split("pain")
# print(S)
results = re.findall(r"pon", S[0])
if len(results) >= 2:
print(len(results)-1)
elif len(results) == 1:
print(-1)
else:
print(-1)