Given an array A of positive integers, let S be the sum of the digits of the minimal element of A.
Return 0 if S is odd, otherwise return 1.
def get_min(arr):
min_number = str(min(arr))
total = 0
for digit in min_number:
total += int(digit)
return 0 if total % 2 != 0 else 1
Top comments (0)