diff options
| author | 冯昶 <seaker@qq.com> | 2020-08-21 16:12:58 +0800 |
|---|---|---|
| committer | 冯昶 <seaker@qq.com> | 2020-08-21 16:12:58 +0800 |
| commit | e4bb19d767bff01ce22546029603afe3b690cf09 (patch) | |
| tree | 96f99f834d01dae9a265534ed0f8ec313a925f88 /challenge-073/walt-mankowski/python/ch-2.py | |
| parent | f35df0a84832788ae2e786e83c0de3504b2f9b0f (diff) | |
| parent | b1cad7fa2c0c1a87309a90f8b6be2b7a38aace5d (diff) | |
| download | perlweeklychallenge-club-e4bb19d767bff01ce22546029603afe3b690cf09.tar.gz perlweeklychallenge-club-e4bb19d767bff01ce22546029603afe3b690cf09.tar.bz2 perlweeklychallenge-club-e4bb19d767bff01ce22546029603afe3b690cf09.zip | |
Merge remote-tracking branch 'upstream/master'
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) |
