#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int a, b, k;
  cin >> a >> b >> k;
  long long int total = 0;
  if (k % 2 != 0) {
    total -= b * (k / 2);
    total += a * (k / 2 + 1);
  } else {
    total -= b * (k / 2);
    total += a * (k / 2);
  }
  cout << total << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) solve();
}
