title: check if it's a magic square with python
body: <p>Input consists of several cases, each with the order n of a square, followed by n rows, each with n natural numbers between 1 and n².
  Like:</p>
  
  <pre><code>3
  6 1 8
  7 5 3
  2 9 4
  
  1
  1
  (...)
  </code></pre>
  
  <p>extra conditions:</p>
  
  <ul>
  <li>all the numbers between 1 and n² appear once</li>
  <li>All rows, columns and the two major diagonals must sum the same.</li>
  </ul>
  
  <p>should print ("yes") if its a magic square and ("no") if don't</p>
  
  <p>so my code solves all correct inputs except the ones that have some number repeated, and I don't know how to solve that problem  </p>
  
  <p>my code </p>
  
  <pre><code>a = read(int)
  while a is not None:
      check1 = True
      t = 0 
      s = 0
      listaA = [] 
      ## create matrix of lists like A([b[],b[],b[]])
      for j in range(a):
          b = []
          for k in range(a):
              c = read(int)
              if c in listaB:
                  (a-1) - k
              listaB.append(c)
              b.append(c)
          listaA.append(b)
      if a == 1:
          check1 = False
          print("yes")
      else:
          x = sum(listaA[0])
      i=0
      while i&lt;a and check1 == True:
      #for i in range(a):
          # suma la primera fila 
          suma=sum(listaA[i])
          if x != suma:
              print('no')
              break
          ## check columns 
          y = 0
          for j in range(a):
              y += listaA[j][i]
          if y != x:
              print('no')
              break
          i+=1
      ## check diagonals
      if i==a: 
          for i in range(a):
              t += (listaA[i][i])
              s += listaA[i][(a-1)-i]
          if s != x or t != x:
              print('no')
  
          else:
              print('yes')
      a = read(int)
  </code></pre>
  
  <p>some idea ???</p>