A frog is currently at the point $0$ on a coordinate axis $Ox$. It jumps by the following algorithm: the first jump is $a$ units to the right, the second jump is $b$ units to the left, the third jump is $a$ units to the right, the fourth jump is $b$ units to the left, and so on.

Formally:   if the frog has jumped an even number of times (before the current jump), it jumps from its current position $x$ to position $x+a$;  otherwise it jumps from its current position $x$ to position $x-b$. 

Your task is to calculate the position of the frog after $k$ jumps.

But... One more thing. You are watching $t$ different frogs so you have to answer $t$ independent queries.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 1000$) — the number of queries.

Each of the next $t$ lines contain queries (one query per line).

The query is described as three space-separated integers $a, b, k$ ($1 \le a, b, k \le 10^9$) — the lengths of two types of jumps and the number of jumps, respectively.


-----Output-----

Print $t$ integers. The $i$-th integer should be the answer for the $i$-th query.


-----Example-----
Input
6
5 2 3
100 1 4
1 10 5
1000000000 1 6
1 1 1000000000
1 1 999999999

Output
8
198
-17
2999999997
0
1



-----Note-----

In the first query frog jumps $5$ to the right, $2$ to the left and $5$ to the right so the answer is $5 - 2 + 5 = 8$.

In the second query frog jumps $100$ to the right, $1$ to the left, $100$ to the right and $1$ to the left so the answer is $100 - 1 + 100 - 1 = 198$.

In the third query the answer is $1 - 10 + 1 - 10 + 1 = -17$.

In the fourth query the answer is $10^9 - 1 + 10^9 - 1 + 10^9 - 1 = 2999999997$.

In the fifth query all frog's jumps are neutralized by each other so the answer is $0$.

The sixth query is the same as the fifth but without the last jump so the answer is $1$.
[{"code": "t = int(input())\nfor i in range(t):\n    a, b, k = list(map(int, input().split()))\n    ans = (a - b) * (k // 2)\n    if k % 2 == 1:\n        ans += a\n    print(ans)\n", "passed": true, "time": 0.22, "memory": 14332.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n\ta, b, k = list(map(int, input().split()))\n\tif k % 2 == 0:\n\t\tprint((a - b) * k // 2)\n\telse:\n\t\tprint((a - b) * (k // 2) + a)\n", "passed": true, "time": 0.16, "memory": 14112.0, "status": "done"}, {"code": "T = int(input())\nfor t in range(T):\n    a, b, c = list(map(int, input().split()))\n    ans = a * ((c + 1) // 2) - b * (c // 2)\n    print(ans)\n", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "#from operator import itemgetter\n#int(input())\n#map(int,input().split())\n#[list(map(int,input().split())) for i in range(q)]\n#print(\"YES\" * ans + \"NO\" * (1-ans))\nt =  int(input())\nfor i in range(t):\n    a,b,k = list(map(int,input().split()))\n    num0 = k // 2\n    num1 = k - num0\n    print(num1 * a - num0 * b )\n", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    T = input().split(' ')\n    a,b,k = int(T[0]), int(T[1]), int(T[2])\n    s = (k//2+k%2)*a - (k//2) * b\n    print(s)\n", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    a, b, k = map(int, input().split())\n    n = k // 2\n    mod = k % 2\n    print(n * (a - b) + mod * a)", "passed": true, "time": 0.36, "memory": 14228.0, "status": "done"}, {"code": "t = int(input())\nfor cas in range(t):\n    a, b, k = map(int, input().split())\n    ans = (a-b)*(k//2)\n    if(k%2==1):\n        ans += a\n    print(ans)", "passed": true, "time": 0.26, "memory": 14360.0, "status": "done"}, {"code": "t = int(input())\n\nfor i in range(t):\n\ta,b,k = map(int,input().split())\n\tbc = k//2\n\tac = k - bc\n\tprint(a*ac-b*bc)", "passed": true, "time": 0.81, "memory": 14328.0, "status": "done"}, {"code": "import sys\nfrom math import floor, ceil\n\ninput = sys.stdin.readline\n\nt = int(input())\n\nfor zzz in range(t):\n    r, l, k = list(map(int, input().split()))\n\n    print(ceil(k/2)*r - floor(k/2)*l)\n", "passed": true, "time": 0.15, "memory": 14096.0, "status": "done"}, {"code": "import math\nfor _ in range(int(input())):\n    a,b,k=list(map(int,input().split()))\n    ans=a*math.ceil(k/2)-b*(k//2)\n    print(ans)\n", "passed": true, "time": 0.15, "memory": 14252.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    a,b,k = map(int, input().split())\n    print(a*(k//2 + k%2) - b*(k//2))", "passed": true, "time": 0.14, "memory": 14056.0, "status": "done"}, {"code": "I=lambda:list(map(int,input().split()))\nfor _ in range(int(input())):\n    a,b,k=I()\n    if k%2==0:\n        print((k//2)*(a-b))\n    else:\n        print((k//2)*(a-b)+a)\n", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "import sys\ninput = sys.stdin.readline\n\ndef main():\n    t = int(input())\n    for i in range(t):\n        a, b, k = list(map(int, input().split()))\n        if k % 2 == 0:\n            answer = a*(k//2) - b*(k//2)\n        else:\n            answer = a*((k//2) + 1) - b*(k//2)\n        print(answer)\n    return\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.14, "memory": 14292.0, "status": "done"}, {"code": "t=int(input())\nQ=[list(map(int,input().split())) for i in range(t)]\n\nfor a,b,k in Q:\n    if k%2==0:\n        print((a-b)*k//2)\n    else:\n        print((a-b)*(k//2)+a)\n", "passed": true, "time": 0.14, "memory": 14372.0, "status": "done"}, {"code": "for _ in range(int(input())):\n    a,b,k = map(int,input().split())\n    if a == b:\n        print(0 if k%2 == 0 else a)\n    else:\n        if k % 2 == 1:\n            print(((k//2)+1)*a - (k//2)*b)\n        else:\n            print(k//2* a - k//2 * b)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "gcd = lambda a, b: gcd(b, a % b) if b else a\n\n\ndef main():\n    t = int(input())\n    for _ in range(t):\n        a, b, c = map(int, input().split())\n        total = 0\n        total -= b * (c // 2)\n        total += a * (c // 2)\n        if c % 2:\n            total += a\n        print(total)\n\n\n\n\nmain()", "passed": true, "time": 0.14, "memory": 14356.0, "status": "done"}, {"code": "n=int(input())\nQ = []\nfor _ in range(n):\n    Q.append(list(map(int,input().split())))\n\nfor a,b,k in Q:\n\ty = int(k/2)\n\tx = k - y\n\tprint(a*x - b*y)\n\n\n", "passed": true, "time": 0.14, "memory": 14264.0, "status": "done"}, {"code": "def main():\n    t = int(input())\n    for i in range(t):\n        a, b, k = map(int, input().split())\n        pos = (a - b) * (k // 2)\n        pos += a * (k % 2)\n        print(pos)\n\nmain()", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "t = int(input())\nfor i in range(t):\n    a, b, k = list(map(int, input().split()))\n    ak = (k + 1) // 2\n    bk = k - ak\n    print(ak * a - bk * b)\n", "passed": true, "time": 0.14, "memory": 14344.0, "status": "done"}, {"code": "for i in range(int(input())):\n  a, b, k=map(int, input().split())\n  if (k==0):\n    print (0)\n    continue\n  if (k%2==0):\n    print (a*(k//2)-b*(k//2))\n  else:\n    print (a*(k//2+1)-b*(k//2))", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "#a = map(int, input().split())\nt = int(input())\nfor i in range(t):\n    a, b, k = list(map(int, input().split()))\n    print((k + 1) // 2 * a - (k // 2) * b)\n", "passed": true, "time": 0.14, "memory": 14128.0, "status": "done"}]