python答案是对的,始终wa求大神看看哪里出问题了?
  • 板块P1317 低洼地
  • 楼主giao1
  • 当前回复5
  • 已保存回复5
  • 发布时间2022/4/30 16:00
  • 上次更新2023/10/28 02:35:06
查看原帖
python答案是对的,始终wa求大神看看哪里出问题了?
690970
giao1楼主2022/4/30 16:00

b=int(input()) a=input().split() c=0 for i in range(1,b-1): if a[i-1]>a[i] and a[i]<=a[i+1] or a[i-1]>=a[i] and a[i]<a[i+1]: c+=1 if a[i-1]==a[i]: c-=1 print(c)

2022/4/30 16:00
加载中...