Result

WA

Duration

563ms

Code [DL]

b>ia*i+bc4**v
v^? }-1:{~i-<
>:&a[r&-r]:&7[r&-r]&3[r&-r]naonaonaonaonaonaonaonaonaonaonaonao;

stdin

65 02 24
82 97 30
36 68 01
27 06 30

stdout

0
26
36
30
15
2
65
-1

stderr

something smells fishy...