結果
| 問題 | 
                            No.1534 おなかがいたい
                             | 
                    
| コンテスト | |
| ユーザー | 
                             wesoweeen
                         | 
                    
| 提出日時 | 2021-06-19 10:09:56 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 239 bytes | 
| コンパイル時間 | 117 ms | 
| コンパイル使用メモリ | 12,800 KB | 
| 実行使用メモリ | 11,264 KB | 
| 最終ジャッジ日時 | 2024-06-22 21:53:59 | 
| 合計ジャッジ時間 | 1,596 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 17 WA * 2 | 
ソースコード
def main():
    S = input()
    target = 'pain'
    idx = S.find(target)
    
    if idx == -1:
        print(idx)
    else:
        r = S[:idx]
        pains = r.count('pon') - 1
        print(pains)
if __name__ == '__main__':
    main()
            
            
            
        
            
wesoweeen