4280 - Max Div K: 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:5018:50, 29 March 2023Andor Giulia talk contribs 343 bytes +343 Pagină nouă: == Rezolvare == <syntaxhighlight lang="python" line="1"> n, k = map(int, input().split()) numbers = list(map(int, input().split())) max_divisible = -1 for num in numbers: if num % k == 0 and num > max_divisible: max_divisible = num if max_divisible == -1: print("NU EXISTA") else: print(max_divisible) </syntaxhighlight>