0768 - Suma Pare 3: 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:4219:42, 3 April 2023Andor Giulia talk contribs 333 bytes +333 Pagină nouă: == rezolvare == <syntaxhighlight lang="python" line="1"> n, m = map(int, input().split()) matrix = [list(map(int, input().split())) for _ in range(n)] unique_even = set() for i in range(n): for j in range(m): if matrix[i][j] % 2 == 0: unique_even.add(matrix[i][j]) print(sum(unique_even)) </syntaxhighlight>