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

Envío 5969

Problema 0xe1 - Cuadrado mágico

  • Autor: d3l4t0rr3
  • Fecha: 2022-04-04 14:35:43 UTC (Hace más de 2 años)
Caso # Resultado Tiempo Memoria
#1
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#2
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#3
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#4
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#5
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#6
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#7
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#8
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#9
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#10
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#11
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#12
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#13
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#14
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#15
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#16
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#17
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#18
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#19
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
#20
Error de compilación
                      main.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
n = int(input())
^
main.c:1:5: error: expected expression
n = int(input())
    ^
main.c:32:21: error: expected ';' after top level declarator
        print("Yes")
                    ^
                    ;
1 warning and 2 errors generated.

                    
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
b = True
while (n):
    p = input()
    f = [int(x) for x in p.split()]
    if sum(f) != suma:
        print("No")
        b = False
        break
    col1 = f[0]
    col2 = f[1]
    col3 =f[2]
    
    m.append(f)
    
    n -= 1
if b:
    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")