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