結果
| 問題 |
No.1534 おなかがいたい
|
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-01 16:57:56 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 2,000 ms |
| コード長 | 166 bytes |
| コンパイル時間 | 378 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-11-25 21:32:25 |
| 合計ジャッジ時間 | 2,649 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 19 |
ソースコード
#yuki1534 s=input() pon=0 for i in range(len(s)): if s[i:i+3]=='pon': pon+=1 if s[i:i+4]=='pain': break if pon<=1 or i==len(s)-1: print(-1) else: print(pon-1)
nohakai3