結果
問題 | No.1534 おなかがいたい |
ユーザー | NatsubiSogan |
提出日時 | 2021-06-06 18:11:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 153 ms / 2,000 ms |
コード長 | 199 bytes |
コンパイル時間 | 84 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-11-23 02:11:22 |
合計ジャッジ時間 | 2,448 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
s = input() ans = -1 f = False for i in range(0, len(s)): if s[i:i + 3] == "pon": ans += 1 if s[i:i + 4] == "pain": f = True break print(ans if ans != 0 and f else -1)