結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-05-21 18:33:24 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 89 ms / 2,000 ms |
| + 934µs | |
| コード長 | 182 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,392 KB |
| 最終ジャッジ日時 | 2026-09-27 01:30:34 |
| 合計ジャッジ時間 | 2,650 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
s=input()
ans=0
n=len(s)
for i in range(n-3):
if s[i:i+3]=='pon':
ans+=1
if s[i:i+4]=='pain':
if ans>=2:
print(ans-1)
else:
print(-1)
exit()
print(-1)
とりゐ