3998 - Sum Max 9: 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.

26 April 2023

29 March 2023

  • curprev 18:3418:34, 29 March 2023Andor Giulia talk contribs 363 bytes +363 Pagină nouă: == Rezolvare == <syntaxhighlight lang="python" line="1"> n = int(input("Introduceti numarul de perechi: ")) perechi = [] for i in range(n): a, b = map(int, input(f"Introduceti perechea {i+1}: ").split()) perechi.append((a, b)) suma_maxima = 0 for a, b in perechi: suma_maxima += max(a, b) print(f"Suma maxima este: {suma_maxima}") </syntaxhighlight>