Skip to content

Commit

Permalink
注意下标
Browse files Browse the repository at this point in the history
  • Loading branch information
BuglessCoder authored Dec 3, 2016
1 parent 630b391 commit 9895a8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 山峰的个数.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
h=[0.9,1.2,1.22,1.1,1.6,0.99]
count=0
for i in range(1,len(h)-1):
if h[i]>h[i-1] and h[i]>h[i+1]:
count+=1
print(count)

0 comments on commit 9895a8a

Please sign in to comment.