You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

8 lines
236 B

#!../k
p:{+0N 2#(" "\x^",=>")^,""}'0:"i/14"
i:`$(*|*|:)'[p],`ORE
m:{@[&#i;i?`$y;:;@[-.'x;-1+#x;*;-1]]}/'p
f:{$[~#n:&0>-1_x;-*|x;o x++/r*-_-'a|-a:(`d$x n)%|/'r:m n]}(m i?`FUEL)*
f 1
t:1000000000000.0;{$[t<a:f x+1;x;o(x+1)|_(x+1)*t%a]}1