Dari_

3833

Feb 19th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. nums = list(map(int, input().split()))
  2. res = 0
  3. for i in range(1, len(nums)-1):
  4.     if nums[i-1] < nums[i] > nums[i+1]:
  5.         res += 1
  6. print(res)
Add Comment
Please, Sign In to add comment