about summary refs log tree commit diff
path: root/day01.ijs
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-12-01 17:32:12 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-12-01 17:32:12 +0100
commit719d1cc73e191a30cc6624d6a4d9a10ecea8ab01 (patch)
tree266d9d5ed4122cb0975350abe0d016324cfbbe92 /day01.ijs
parent27f7de20db72a24d68f794f9b166afa9420b3448 (diff)
downloadadventofcode2016-719d1cc73e191a30cc6624d6a4d9a10ecea8ab01.tar.gz
adventofcode2016-719d1cc73e191a30cc6624d6a4d9a10ecea8ab01.tar.xz
adventofcode2016-719d1cc73e191a30cc6624d6a4d9a10ecea8ab01.zip
day01
Diffstat (limited to 'day01.ijs')
-rw-r--r--day01.ijs12
1 files changed, 12 insertions, 0 deletions
diff --git a/day01.ijs b/day01.ijs
new file mode 100644
index 0000000..6b0dfce
--- /dev/null
+++ b/day01.ijs
@@ -0,0 +1,12 @@
+d=: }."1 ;._1', ',(1!:1<'day01')
+
+p=: [: +/ [: |"1 [: +. [
+
+t=: */\0j1*<:+:'R'= {."1 d
+l=: 0". }."1 d
+echo p +/l*t
+
+fd=: [ {~ 0 i.~ [: ~: [
+echo p fd +/\t{~I.l
+
+exit 0