結果

問題 No.1534 おなかがいたい
ユーザー harurun
提出日時 2021-06-07 11:29:39
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 123 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 14,972 KB
最終ジャッジ日時 2024-11-24 13:29:25
合計ジャッジ時間 1,490 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 2
other AC * 9 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
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