結果
| 問題 |
No.1534 おなかがいたい
|
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-01 16:48:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 329 bytes |
| コンパイル時間 | 109 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 12,640 KB |
| 最終ジャッジ日時 | 2024-11-25 21:22:08 |
| 合計ジャッジ時間 | 2,459 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 WA * 6 |
ソースコード
s=list(input())
n=len(s)
l=[]
y=10**6
for i in range(n-3):
if s[i]=="p" and s[i+1]=="a" and s[i+2]=="i" and s[i+3]=="n":
y=i-3
break
if y==10**6:
exit(print(-1))
ans=0
for i in range(y-2):
if s[i]=="p" and s[i+1]=="o" and s[i+2]=="n":
ans+=1
if ans<=1:
print(-1)
else:
print(ans)
nohakai3