SHARE
TWEET

3832

Dari_ Feb 19th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top