結果

問題 No.1534 おなかがいたい
ユーザー harurunharurun
提出日時 2021-06-07 11:29:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,972 KB
最終ジャッジ日時 2024-05-03 13:19:52
合計ジャッジ時間 1,969 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,496 KB
testcase_01 WA -
testcase_02 AC 29 ms
10,624 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 28 ms
10,624 KB
testcase_07 AC 28 ms
10,496 KB
testcase_08 WA -
testcase_09 AC 28 ms
10,624 KB
testcase_10 AC 28 ms
10,496 KB
testcase_11 AC 29 ms
10,624 KB
testcase_12 WA -
testcase_13 AC 30 ms
11,008 KB
testcase_14 AC 52 ms
14,844 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 34 ms
12,236 KB
testcase_20 AC 30 ms
11,008 KB
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.py:7: SyntaxWarning: invalid decimal literal
  print(c-1if f else -1)

ソースコード

diff #

c=f=0
for i in input().replace("np","n p").split():
 if i=="pain":
  f=1
  break
 elif i=="pon":c+=1
print(c-1if f else -1)
0