結果

問題 No.1534 おなかがいたい
ユーザー KudeKude
提出日時 2021-06-06 18:02:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 81 ms / 2,000 ms
コード長 143 bytes
コンパイル時間 1,463 ms
コンパイル使用メモリ 86,956 KB
実行使用メモリ 72,220 KB
最終ジャッジ日時 2023-08-15 00:02:59
合計ジャッジ時間 3,190 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,292 KB
testcase_01 AC 71 ms
71,348 KB
testcase_02 AC 71 ms
71,312 KB
testcase_03 AC 70 ms
71,536 KB
testcase_04 AC 71 ms
71,256 KB
testcase_05 AC 70 ms
71,256 KB
testcase_06 AC 73 ms
71,516 KB
testcase_07 AC 72 ms
71,524 KB
testcase_08 AC 71 ms
71,440 KB
testcase_09 AC 72 ms
71,464 KB
testcase_10 AC 71 ms
71,276 KB
testcase_11 AC 73 ms
71,352 KB
testcase_12 AC 73 ms
71,700 KB
testcase_13 AC 76 ms
71,648 KB
testcase_14 AC 74 ms
71,644 KB
testcase_15 AC 74 ms
71,776 KB
testcase_16 AC 81 ms
72,220 KB
testcase_17 AC 77 ms
71,884 KB
testcase_18 AC 76 ms
71,764 KB
testcase_19 AC 74 ms
71,776 KB
testcase_20 AC 76 ms
72,060 KB
testcase_21 AC 73 ms
71,492 KB
testcase_22 AC 72 ms
71,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
i = s.find('pain')
if i == -1:
    print(-1)
    exit()
cnt = s[:i].count('pon')
if cnt < 2:
    print(-1)
else:
    print(cnt - 1)
0