aboutsummaryrefslogtreecommitdiff
path: root/challenge-245/eric-cheung/python/ch-2.py
blob: 9f531e288b11e89537b17b9bf81ddb4aa6b571ee (plain)
1
2
3
4
5
6
7
8
## arrDigits = [8, 1, 9]  ## Example 1
arrDigits = [8, 6, 7, 1, 0]  ## Example 2

if sum(arrDigits) % 3 == 0:
    print ("".join(sorted([str(DigitLoop) for DigitLoop in arrDigits], reverse = True)))
else:
    print (-1)