█████████ ████ ███░░░░░███ ░░███ ███ ░░░ ██████ ███████ ██████ ██████ ░███ ███░░███ ███░░███ ███░░███ ███░░███ ░███ ░███ ░███░███ ░███ ░███████ ░███ ░███ ░░███ ███░███ ░███░███ ░███ ░███░░░ ░███ ░███ ░░█████████ ░░██████ ░░████████░░██████ ░░██████ ░░░░░░░░░ ░░░░░░ ░░░░░░░░ ░░░░░░ ░░░░░░

Envío 5970

Problema 0xe1 - Cuadrado mágico

  • Autor: d3l4t0rr3
  • Fecha: 2022-04-04 14:41:18 UTC (Hace casi 2 años)
Caso # Resultado Tiempo Memoria
#1
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.008 s 3 KBi
#2
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#3
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#4
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.008 s 3 KBi
#5
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#6
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.042 s 7 KBi
#7
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.011 s 3 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#11
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.008 s 3 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.023 s 4 KBi
#14
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.026 s 3 KBi
#15
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.008 s 3 KBi
#16
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.023 s 3 KBi
#17
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.011 s 3 KBi
#18
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.008 s 3 KBi
#19
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.01 s 3 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
  File "script.py", line 25
    if : todos != suma*8
       ^
SyntaxError: invalid syntax
0.025 s 3 KBi
Puntos totales: 0 / 100

Código

n = int(input())
m = []
p = input()
f = [int(x) for x in p.split()]
m.append(f)
suma = sum(f)
col1 = f[0]
col2 = f[1]
col3 =f[2]
n -= 1
while (n):
    p = input()
    f = [int(x) for x in p.split()]
    col1 += f[0]
    col2 += f[1]
    col3 += f[2]
    m.append(f)
    n -= 1

dig1 = sum((m[0][0],m[1][1],m[2][2]))
dig2 = sum((m[0][2],m[1][1],m[2][0]))
fil2 = sum(m[1])
fil3 =sum(m[2])
todos = sum((dig1, dig2, col1, col2, col3, fil2, fil3, suma))
if : todos != suma*8
    print("No")
else:
    print("Yes")