結果
| 問題 | No.1534 おなかがいたい |
| コンテスト | |
| ユーザー |
megumeguro
|
| 提出日時 | 2021-06-06 18:32:01 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 262 bytes |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-11-23 03:03:42 |
| 合計ジャッジ時間 | 2,050 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
s = input()
n = len(s)
flg = False
for i in range(n-3):
#print(s[i:i+4])
if s[i:i+4] == 'pain':
flg = True
f = i
break
if not flg:
print(-1)
exit()
c = s[:f].count('pon')
if c < 2:
print(-1)
exit()
print(c-1)
megumeguro