#include <bits/stdc++.h>
using namespace std;
int main() {
  long long q;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    long long a, b, k;
    long long x1 = 0;
    long long x2 = 0;
    cin >> a >> b >> k;
    x1 = ((k + 1) / 2) * a;
    x2 = (k / 2) * b;
    cout << x1 - x2 << endl;
  }
  return 0;
}
