結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-06-06 18:06:14 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 169 bytes |
| 記録 | |
| コンパイル時間 | 151 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 59,648 KB |
| 最終ジャッジ日時 | 2026-05-16 23:41:49 |
| 合計ジャッジ時間 | 1,857 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
S=input()
if "pain" not in S:
exit(print(-1))
x=S.index("pain")
T=S[:x+4]
m=0
for i in range(x):
if T[i:i+3]=="pon":
m+=1
print(m-1 if m>=2 else -1)
Kazun