Batman and Robin are on a mission. Their is a bomb which they want to diffuse but the problem is they have to solve a task first which is very difficult for them.
As you are their friend, they ask you to solve the problem for them.
You are given a pair (A, B). After each operation pair (A, B) gets changed to (B - 2A, 2B + A).
You are given the initial value of A and B you have to find and return the value of pair after Cth operation.
1 <= A, B C <= 109
First argument is an integer A.
Second argument is an integer B.
Third argument is an integer C.
Return an integer array containing two integers (mod 109 + 7) denoting the two values of pair after C operations.
A = 1 B = 3 C = 1
A = 5 B = 10 C = 2
Initally pair is (1, 3) after one operation => (3 - 21 , 23 + 1) => (1, 7)
Initally pair is (5, 10) after one operation => (0, 25) and after second operation => (25, 50)
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.