0804 - Col Egale
Rezolvare
<syntaxhighlight lang="python" line="1"> m, n = map(int, input().split())
matrix = [] for i in range(m):
row = list(map(int, input().split())) matrix.append(row)
found = False for j in range(n):
col = [matrix[i][j] for i in range(m)] if len(set(col)) == 1: print(col[0], end=' ') found = True
if not found:
print("nu exista")
</syntaxhighlight>