結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 26 ms
8,940 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 25 ms
8,932 KB
testcase_07 WA -
testcase_08 AC 25 ms
8,868 KB
testcase_09 AC 25 ms
8,872 KB
testcase_10 AC 25 ms
8,924 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 26 ms
9,240 KB
testcase_14 AC 27 ms
9,240 KB
testcase_15 AC 26 ms
9,204 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 26 ms
9,236 KB
testcase_20 AC 26 ms
9,280 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
import sys

S = input()
if S not in "pain":
    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