#include <bits/stdc++.h>
const long long INF = 1e18;
using namespace std;
int main() {
  int tt;
  cin >> tt;
  while (tt--) {
    long long a, b, k;
    cin >> a >> b >> k;
    if (k % 2 == 0) {
      cout << (a - b) * (k / 2) << "\n";
    } else {
      long long right = (k / 2 + 1);
      long long left = (k / 2);
      cout << (a * right - b * left) << "\n";
    }
  }
  return 0;
}
