July 24, 2021
def solution(arr, divisor): answer = [] for n in arr: if n % divisor == 0: answer.append(n) return sorted(answer) if answer else [-1]
def solution(arr, divisor): return sorted([n for n in arr if n % divisor == 0]) or [-1]
GitHubVelogFacebook