Advertisement
Dari_

3832

Feb 19th, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #1 variant
  2.  
  3. s = list(map(int, input().split()))
  4. for i in range(1, len(s)):
  5.     if (s[i-1] >= 0 and s[i] >= 0) or (s[i-1] <= 0 and s[i] <= 0):
  6.         print(s[i-1], s[i])
  7.         break
  8.  
  9. #2 variant
  10.  
  11. s = list(map(int, input().split()))
  12. ind = 0
  13. for i in range(1, len(s)):
  14.     if ((s[i-1] >= 0 and s[i] >= 0) or (s[i-1] <= 0 and s[i] <= 0)) and (ind == 0):
  15.         print(s[i-1], s[i])
  16.         ind = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement