Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 31st, 2020 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. a = []
  3. for i in range(8):
  4.     a.append(list(map(int, input().split())))
  5. for i in range(7):
  6.     mult = True
  7.     for j in range(7):
  8.         if a[i][j] // abs(a[i][j]) != a[i][j + 1] // abs(a[i][j + 1]):
  9.             mult = False
  10.     if mult == True:
  11.         continue
  12.     else:
  13.         for j in range(8):
  14.             if a[i][j] < 0:
  15.                 tmp1 = a[i + 1][j]
  16.                 tmp2 = a[i][j]
  17.                 a[i][j] = tmp1
  18.                 a[i + 1][j] = tmp2
  19.                 mult1 = True
  20.                 for k in range(7):
  21.                     if a[i][k] // abs(a[i][k]) != a[i][k + 1] // abs(a[i][k + 1]):
  22.                         mult1 = False
  23.                 if mult1 == True:
  24.                     break
  25.                 else:
  26.                     if j == 7:
  27.                         print("NO")
  28.                         sys.exit(0)
  29. print("YES")
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