about summary refs log tree commit diff
path: root/day13.ijs
blob: 9accec0fc13df6d31a25c0cb3971f2eb33b6a716 (plain) (blame)
1
2
3
4
5
6
7
8
9
load 'aoc.ijs'
't oy' =: lines 'day13'
x =: 0
y =: 0 -.~ oy =: x: ".&> (<;._1 ',',oy)

(n{y)*v{~n=.{./:v=.y-y|".t  NB. 2298

minv =: ]|(^-&2x)  NB. x assumed prime
(*/y)|+/(-oy i. y)*((*/%])([*minv)])y  NB. 783685719679632