193k views
5 votes
Input= 6 , 0, 4
Output= -4, 8, 0
What's the secret code?

1 Answer

2 votes
Multiply the input by -2, then add 8:
x * -2 + 8

input:
[6,0,4]

After step 1:
[-12,0,-8]

After step 2:
[-4,8,0]
User Matt Ball
by
6.4k points