0766 - Nr Pare
Rezolvare
<syntaxhighlight lang="python" line="1"> n, m = map(int, input().split())
max_count = 0 max_rows = []
for i in range(n):
row = list(map(int, input().split())) count = sum(1 for x in row if x % 2 == 0) if count > max_count: max_count = count max_rows = [i+1] elif count == max_count: max_rows.append(i+1)
if max_count == 0:
print("NU EXISTA")
else:
print(*max_rows)
</syntaxhighlight>