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