Advertisement
DemidShumakher

sdf

Nov 22nd, 2021
803
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. sum_d = lambda l: True if sum([l[x][x] for x in range(len(l))]) == sum([[l][x][len(l)-x-1] for x in range(len(l))]) else False
  2. sum_g = lambda l: True if len([sum(x) if sum(x) == sum(l[0])  for x in l]) == len(l) else False
  3. sum_v = lambda l: True if len(set([sum([l[x][y] for x in range(len(l))]) for y in range len(l)])) == 1 else False
  4. l = [] # Тут список
  5. print( True if sum_d(l) == sum_g(l) and sum_g(l)== sum_v(l) else False)
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement