#include <bits/stdc++.h>
int main() {
  int t, i;
  long long int a, b, k, t1, t2, sum = 0;
  scanf("%d", &t);
  for (i = 1; i <= t; i++) {
    scanf("%I64d %I64d %I64d", &a, &b, &k);
    if (k % 2 != 0) {
      t1 = ((k - 1) / 2) + 1;
      t2 = k / 2;
      sum = (a * t1) - (b * t2);
      printf("%I64d\n", sum);
    } else {
      t1 = k / 2;
      sum = (a * t1) - (b * t1);
      printf("%I64d\n", sum);
    }
  }
  return 0;
}
