diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-12-05 14:39:57 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-12-05 14:39:57 +0100 |
commit | e54f59ea77900220f4dd424fcc5320ae55037d2b (patch) | |
tree | c69b777d834c5ddae1266d23132247dd71979638 | |
parent | fa50c09740fd8a0b160a53c307a98e2234057726 (diff) | |
download | adventofcode2016-e54f59ea77900220f4dd424fcc5320ae55037d2b.tar.gz adventofcode2016-e54f59ea77900220f4dd424fcc5320ae55037d2b.tar.xz adventofcode2016-e54f59ea77900220f4dd424fcc5320ae55037d2b.zip |
day05
-rw-r--r-- | day05.k | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/day05.k b/day05.k new file mode 100644 index 0000000..1b9f4dc --- /dev/null +++ b/day05.k @@ -0,0 +1,15 @@ +/ use q 2016.03.14 +md5: ![-15] + +d:"ffykfhsq" + +r:0 +s:0 +/ { r::(1+)/[{~"00000"~5#s::,/$md5@d,$x};r+1]; 1 s[5] }'!7; +-1""; + +r: 0 +p:8#"_" +{ r::(1+)/[{~"00000"~5#s::,/$md5@d,$x};r+1];$[s[5]<"8";$[p[. s[5]]="_";p[. s[5]]:s[6];];]; 1@p," ",($r)," ",($x),"\n" }'!34; + +\\ |