aboutsummaryrefslogtreecommitdiff
path: root/challenge-073/shawak
diff options
context:
space:
mode:
authorMaximilian <Shawak@users.noreply.github.com>2020-08-10 14:21:55 +0200
committerGitHub <noreply@github.com>2020-08-10 14:21:55 +0200
commita15356483866595f4f8d579ce75c4b97578c3d54 (patch)
treeccfd9bd1c1e62f03df8a3f2bab3df42025677ec9 /challenge-073/shawak
parentdf778d1016d00d436ca2628460f39631b724028b (diff)
downloadperlweeklychallenge-club-a15356483866595f4f8d579ce75c4b97578c3d54.tar.gz
perlweeklychallenge-club-a15356483866595f4f8d579ce75c4b97578c3d54.tar.bz2
perlweeklychallenge-club-a15356483866595f4f8d579ce75c4b97578c3d54.zip
Create ch-1.rb
Diffstat (limited to 'challenge-073/shawak')
-rw-r--r--challenge-073/shawak/ruby/ch-1.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/challenge-073/shawak/ruby/ch-1.rb b/challenge-073/shawak/ruby/ch-1.rb
new file mode 100644
index 0000000000..eb3dd7ac41
--- /dev/null
+++ b/challenge-073/shawak/ruby/ch-1.rb
@@ -0,0 +1,3 @@
+a=gets.split.map &:to_i
+s=gets.to_i/2
+p (s...a.size-s).map{|x|a[x-s..x+s].min}