about summary refs log tree commit diff
path: root/codechef/maxfun.raku
diff options
context:
space:
mode:
Diffstat (limited to 'codechef/maxfun.raku')
-rwxr-xr-xcodechef/maxfun.raku6
1 files changed, 6 insertions, 0 deletions
diff --git a/codechef/maxfun.raku b/codechef/maxfun.raku
new file mode 100755
index 0000000..bddd6ca
--- /dev/null
+++ b/codechef/maxfun.raku
@@ -0,0 +1,6 @@
+#!/usr/bin/env raku
+for ^get() {
+    get;
+    my @a = map (words get): +*;
+    put (@a.max - @a.min) * 2
+}