0766 - Nr Pare: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

19 April 2023

3 April 2023

  • curprev 19:4519:45, 3 April 2023Andor Giulia talk contribs 450 bytes +450 Pagină nouă: == 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>