python求助!
  • 板块P1317 低洼地
  • 楼主xzx191138
  • 当前回复3
  • 已保存回复3
  • 发布时间2022/7/13 11:18
  • 上次更新2023/10/27 20:42:23
查看原帖
python求助!
726083
xzx191138楼主2022/7/13 11:18
n=int(input())
h=list(map(float,input().split()))
s=0
for i in range(1,len(h)-1):
    if h[i]<h[i-1] and h[i]<=h[i+1]:
        s=s+1
print(s)

2022/7/13 11:18
加载中...