aboutsummaryrefslogtreecommitdiff
path: root/challenge-284/eric-cheung/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-284/eric-cheung/python/ch-1.py')
-rwxr-xr-xchallenge-284/eric-cheung/python/ch-1.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-284/eric-cheung/python/ch-1.py b/challenge-284/eric-cheung/python/ch-1.py
new file mode 100755
index 0000000000..a692fad3bf
--- /dev/null
+++ b/challenge-284/eric-cheung/python/ch-1.py
@@ -0,0 +1,11 @@
+
+## arrInts = [2, 2, 3, 4] ## Example 1
+## arrInts = [1, 2, 2, 3, 3, 3] ## Example 2
+arrInts = [1, 1, 1, 3] ## Example 3
+
+arrLucky = [nLoop for nLoop in set(arrInts) if arrInts.count(nLoop) == nLoop]
+
+if len(arrLucky) == 0:
+ print (-1)
+else:
+ print (max(arrLucky))