4280 - Max Div K
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>