Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.039 s | 7 KBi |
#2 |
Correcto
|
0.024 s | 3 KBi |
#3 |
Correcto
|
0.031 s | 8 KBi |
#4 |
Correcto
|
0.024 s | 3 KBi |
#5 |
Correcto
|
0.024 s | 3 KBi |
#6 |
Correcto
|
0.031 s | 3 KBi |
#7 |
Correcto
|
0.024 s | 3 KBi |
#8 |
Correcto
|
0.022 s | 3 KBi |
#9 |
Correcto
|
0.024 s | 3 KBi |
#10 |
Correcto
|
0.022 s | 3 KBi |
#11 |
Correcto
|
0.016 s | 3 KBi |
#12 |
Correcto
|
0.017 s | 3 KBi |
#13 |
Correcto
|
0.034 s | 3 KBi |
#14 |
Correcto
|
0.023 s | 3 KBi |
#15 |
Incorrecto
|
0.018 s | 3 KBi |
#16 |
Correcto
|
0.024 s | 3 KBi |
#17 |
Correcto
|
0.031 s | 3 KBi |
#18 |
Correcto
|
0.031 s | 3 KBi |
#19 |
Correcto
|
0.032 s | 3 KBi |
#20 |
Correcto
|
0.039 s | 3 KBi |
def magic_square(square, n): for i in range(0, n): for j in range(0, n): if i == 0 and j == 0: continue if j == 0: square[i][j] += square[i - 1][n - 1] else: square[i][j] += square[i][j - 1] if (square[n - 1][n - 1] / (n * n)).is_integer(): print("Yes") else: print("No") n = int(input()) square = [[int(x) for x in input().split()] for _ in range(n)] magic_square(square, n)