diff options
Diffstat (limited to 'challenge-245/eric-cheung/python/ch-2.py')
| -rwxr-xr-x | challenge-245/eric-cheung/python/ch-2.py | 8 |
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)
|
