about summary refs log tree commit diff
path: root/day2.k
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-12-06 20:12:55 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-12-06 20:12:55 +0100
commit109d688f12f4f36b8d4d12f178b4e42ebdf02ffa (patch)
treee7b09dad9338875461b57215f7027fe4b126e610 /day2.k
parent0d81acde56337fc169c7fee89cbd069d5dd53108 (diff)
downloadadventofcode2015-109d688f12f4f36b8d4d12f178b4e42ebdf02ffa.tar.gz
adventofcode2015-109d688f12f4f36b8d4d12f178b4e42ebdf02ffa.tar.xz
adventofcode2015-109d688f12f4f36b8d4d12f178b4e42ebdf02ffa.zip
day2
Diffstat (limited to 'day2.k')
-rw-r--r--day2.k7
1 files changed, 7 insertions, 0 deletions
diff --git a/day2.k b/day2.k
new file mode 100644
index 0000000..1e5e9fd
--- /dev/null
+++ b/day2.k
@@ -0,0 +1,7 @@
+d:+("III";"x")0:"day2";
+
++/{(&/x*1!x) + x _dot 2*1!x}'d / total wrapping paper
+
+r:{2*+/2#x@<x}'d; / ribbon
+b:*/'d; / bow
++/(r+b) / total ribbon