Skip to content

Commit

Permalink
Day 10 simpler, faster, more analytical solution.
Browse files Browse the repository at this point in the history
  • Loading branch information
jayfoad committed Dec 10, 2018
1 parent efb0c46 commit 81068cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p10.dyalog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
p¨¨'-?\d+'⎕S'&'¨⎕NGET'p10.txt'1
q0 2p p0 ¯2p
n(/){+/(-)p+×q}¨¯2×0.5+(+÷),p÷q
mean+÷
n0.5+mean,-(p-1 mean p)÷(q-1 mean q)
c(-1)p+n×q
'#'@(⎕IO+c)(1+c)'' part 1
n part 2

0 comments on commit 81068cc

Please sign in to comment.