0778 - MChenar: 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:0619:06, 3 April 2023MiclausIoana talk contribs 834 bytes +834 Pagină nouă: == Rezolvare == <syntaxhighlight lang="python" line="1"> n, m = map(int, input().split()) # Inițializăm matricea cu zero-uri matrix = [[0 for j in range(m)] for i in range(n)] # Citim elementele matricei de la tastatură for i in range(n): row = list(map(int, input().split())) for j in range(m): matrix[i][j] = row[j] # Parcurgem chenarul și adăugăm elementele distincte într-un set distinct_elements = set() for j in range(m): distinct_elements.add(...