#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  for (int i = 1; i <= t; ++i) {
    long long a, b, k;
    cin >> a >> b >> k;
    long long kq = 0, so1, so2;
    if (k % 2 == 0) {
      so1 = k / 2;
      so2 = k / 2;
    } else {
      so2 = k / 2;
      so1 = k - so2;
    }
    kq += so1 * a;
    kq -= so2 * b;
    cout << kq << '\n';
  }
  return (0);
}
