aboutsummaryrefslogtreecommitdiff
path: root/challenge-201/sgreen/python/ch-1.py
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-201/sgreen/python/ch-1.py')
-rwxr-xr-xchallenge-201/sgreen/python/ch-1.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/challenge-201/sgreen/python/ch-1.py b/challenge-201/sgreen/python/ch-1.py
new file mode 100755
index 0000000000..e42e28f11c
--- /dev/null
+++ b/challenge-201/sgreen/python/ch-1.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python3
+
+import sys
+
+
+def main(n):
+ # Find numbers between 0 and the length of n that don't appear in the input
+ missing = [i for i in range(len(n)+1) if i not in n]
+ print(*missing, sep=', ')
+
+
+if __name__ == '__main__':
+ # Turn the strings into integers
+ n = [int(i) for i in sys.argv[1:]]
+ main(n)