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