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

Envío 5968

Problema 0xe1 - Cuadrado mágico

  • Autor: d3l4t0rr3
  • Fecha: 2022-04-04 14:33:53 UTC (Hace casi 2 años)
Caso # Resultado Tiempo Memoria
#1
Incorrecto
0.011 s 3 KBi
#2
Incorrecto
0.01 s 3 KBi
#3
Incorrecto
0.02 s 3 KBi
#4
Correcto
0.01 s 3 KBi
#5
Correcto
0.023 s 3 KBi
#6
Correcto
0.023 s 3 KBi
#7
Correcto
0.027 s 3 KBi
#8
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 24, in <module>
    dig1 = sum((m[0][0],m[1][1],m[2][2]))
IndexError: list index out of range
0.008 s 3 KBi
#9
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 24, in <module>
    dig1 = sum((m[0][0],m[1][1],m[2][2]))
IndexError: list index out of range
0.021 s 3 KBi
#10
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 24, in <module>
    dig1 = sum((m[0][0],m[1][1],m[2][2]))
IndexError: list index out of range
0.008 s 3 KBi
#11
Correcto
0.011 s 3 KBi
#12
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 9, in <module>
    col3 =f[2]
IndexError: list index out of range
0.011 s 3 KBi
#13
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 9, in <module>
    col3 =f[2]
IndexError: list index out of range
0.032 s 3 KBi
#14
Incorrecto
0.01 s 3 KBi
#15
Incorrecto
0.022 s 3 KBi
#16
Incorrecto
0.012 s 3 KBi
#17
Correcto
0.01 s 3 KBi
#18
Incorrecto
0.011 s 3 KBi
#19
Incorrecto
0.01 s 3 KBi
#20
Error en tiempo de ejecución (NZEC)
Exited with error status 1
Traceback (most recent call last):
  File "script.py", line 24, in <module>
    dig1 = sum((m[0][0],m[1][1],m[2][2]))
IndexError: list index out of range
0.01 s 3 KBi
Puntos totales: 30 / 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()]
    if sum(f) != suma:
        print("No")
        break
    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]))
if col1 != col2 or col1 != suma or dig1 != dig2 or dig1 != suma:
    print("No")
else:
    print("Yes")