about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-12-06 20:13:05 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-12-06 20:13:05 +0100
commitf776a85a24c55f9233f1e881dcd8678d3b3f5080 (patch)
treeb02d93f16c38de59bda4ab191fb6a43ebc45d2fc
parent90e1438863b710e9e19a6208d2e1fd953bfdec2a (diff)
downloadadventofcode2015-f776a85a24c55f9233f1e881dcd8678d3b3f5080.tar.gz
adventofcode2015-f776a85a24c55f9233f1e881dcd8678d3b3f5080.tar.xz
adventofcode2015-f776a85a24c55f9233f1e881dcd8678d3b3f5080.zip
day4
-rw-r--r--day4.k13
1 files changed, 13 insertions, 0 deletions
diff --git a/day4.k b/day4.k
new file mode 100644
index 0000000..4070f0c
--- /dev/null
+++ b/day4.k
@@ -0,0 +1,13 @@
+/ use q 2014.03.27, not kona
+d: "ckczppom";
+
+md5: ![-15];
+
+/ naive map
+m:150000;
+h:,/'$md5@/:d,/:$!m;
+i: (5#'h) ? "00000";
+i+1
+
+/ iteration
+(1+)/[{~"000000"~6#,/$md5@d,$x};1]
\ No newline at end of file