#include <bits/stdc++.h>
int main() {
  long long int a, b, k, i = 0, t, k1, k2, j = 0;
  scanf("%lld", &t);
  while (i < t) {
    j = 0;
    k1 = 0;
    k2 = 0;
    a = 0;
    b = 0;
    k = 0;
    scanf("%lld%lld%lld", &a, &b, &k);
    k1 = k / 2;
    k2 = k - k / 2;
    j = j + a * k2;
    j = j - b * k1;
    printf("%lld\n", j);
    i++;
  }
}
