#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, k, d = 0;
  int t;
  cin >> t;
  while (t--) {
    d = 0;
    cin >> n >> m >> k;
    if (k % 2 == 1) {
      d = (k / 2) + 1;
    } else {
      d = k / 2;
    }
    d = (d * n) - ((k - d) * m);
    cout << d << "\n";
  }
  return 0;
}
