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