aboutsummaryrefslogblamecommitdiff
path: root/day24.k5
blob: 0a3ea6f364a9d8b094b3a0a6d5485efced19472d (plain) (tree)
1
2
3
4
5
6
7
8







                                                                                     
/ use ok

n:4
d:{x@>x}@.:'-1_0:"day24"
g:(+/d)%n
r:{`0:,$#x; $[6<#x; (); g=t:+/x; ,x; (t<g)&(0<#y); ,/{[v]r[x,*v;1_v]}'(!#y)_\:y; ()]}
s:r[(); d]
&/*/'s