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