結果
問題 |
No.1534 おなかがいたい
|
ユーザー |
![]() |
提出日時 | 2021-05-21 18:33:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 144 ms / 2,000 ms |
コード長 | 182 bytes |
コンパイル時間 | 119 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,264 KB |
最終ジャッジ日時 | 2024-11-20 14:05:13 |
合計ジャッジ時間 | 2,449 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)