結果

問題 No.1534 おなかがいたい
ユーザー TnaTna
提出日時 2022-07-08 13:14:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 10,472 KB
実行使用メモリ 9,616 KB
最終ジャッジ日時 2023-08-27 06:26:31
合計ジャッジ時間 1,688 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
8,900 KB
testcase_01 AC 26 ms
9,000 KB
testcase_02 AC 26 ms
9,012 KB
testcase_03 AC 26 ms
8,928 KB
testcase_04 AC 26 ms
8,872 KB
testcase_05 AC 26 ms
8,924 KB
testcase_06 AC 26 ms
8,952 KB
testcase_07 AC 25 ms
8,912 KB
testcase_08 WA -
testcase_09 AC 25 ms
8,920 KB
testcase_10 AC 25 ms
8,984 KB
testcase_11 AC 25 ms
8,904 KB
testcase_12 AC 26 ms
9,208 KB
testcase_13 AC 28 ms
9,372 KB
testcase_14 AC 26 ms
9,180 KB
testcase_15 WA -
testcase_16 AC 30 ms
9,592 KB
testcase_17 AC 30 ms
9,616 KB
testcase_18 AC 30 ms
9,612 KB
testcase_19 AC 27 ms
9,144 KB
testcase_20 AC 28 ms
9,296 KB
testcase_21 AC 25 ms
8,960 KB
testcase_22 AC 24 ms
8,872 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
import sys

S = input()
if  "pain" not in S:
    print(-1)
    sys.exit()
S = S.split("pain")
# print(S)
results = re.findall(r"pon", S[0])
if results:
    print(len(results)-1)
else:
    print(-1)
0