diff options
Diffstat (limited to 'challenge-073/walt-mankowski/python/ch-2.py')
| -rw-r--r-- | challenge-073/walt-mankowski/python/ch-2.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-073/walt-mankowski/python/ch-2.py b/challenge-073/walt-mankowski/python/ch-2.py new file mode 100644 index 0000000000..00ce682c69 --- /dev/null +++ b/challenge-073/walt-mankowski/python/ch-2.py @@ -0,0 +1,11 @@ +from sys import argv + +a = [int(x) for x in argv[1:]] +output = [0] +curmin = a[0] + +for x in a[1:]: + output.append(curmin if curmin < x else 0) + curmin = min(curmin, x) + +print(output) |
