#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  long long a[t][3];
  for (int i = 0; i < t; i++) {
    cin >> a[i][0] >> a[i][1] >> a[i][2];
  }
  long long b[t];
  for (int i = 0; i < t; i++) {
    int l = 0;
    if (a[i][2] % 2 == 0) {
      l = a[i][2] / 2;
      b[i] = l * a[i][0] - l * a[i][1];
    } else {
      l = a[i][2] / 2;
      b[i] = (l + 1) * a[i][0] - l * a[i][1];
    }
  }
  for (int i = 0; i < t; i++) {
    cout << b[i] << endl;
  }
}
