Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1 variant
- s = list(map(int, input().split()))
- for i in range(1, len(s)):
- if (s[i-1] >= 0 and s[i] >= 0) or (s[i-1] <= 0 and s[i] <= 0):
- print(s[i-1], s[i])
- break
- #2 variant
- s = list(map(int, input().split()))
- ind = 0
- for i in range(1, len(s)):
- if ((s[i-1] >= 0 and s[i] >= 0) or (s[i-1] <= 0 and s[i] <= 0)) and (ind == 0):
- print(s[i-1], s[i])
- ind = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement