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