Sofya_Soloveva_

Untitled

Jul 10th, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. k = 0
  2. a = int(input())
  3. for i in range(9):
  4.         b = int(input())
  5.         if (a > 0 and b < 0) or (a < 0 and b > 0) :
  6.                 k += 1
  7.                 a = b
  8. print(k)
Advertisement
Add Comment
Please, Sign In to add comment