aboutsummaryrefslogtreecommitdiff
path: root/challenge-245/eric-cheung/python/ch-2.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-245/eric-cheung/python/ch-2.py')
-rwxr-xr-xchallenge-245/eric-cheung/python/ch-2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-245/eric-cheung/python/ch-2.py b/challenge-245/eric-cheung/python/ch-2.py
new file mode 100755
index 0000000000..9f531e288b
--- /dev/null
+++ b/challenge-245/eric-cheung/python/ch-2.py
@@ -0,0 +1,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)