結果
問題 | No.1534 おなかがいたい |
ユーザー |
|
提出日時 | 2021-08-11 16:13:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 33 ms / 2,000 ms |
コード長 | 196 bytes |
コンパイル時間 | 322 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-09-25 03:00:10 |
合計ジャッジ時間 | 2,141 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 19 |
ソースコード
def itami(s: str) -> int: if "pain" not in s: return -1 cnt = s.split("pain")[0].count("pon") if cnt>=2: return cnt-1 else:return -1 S=input() print(itami(S))