#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c;
    cin >> a >> b >> c;
    long long int tot1 = c / 2 + c % 2;
    long long int tot2 = c / 2;
    tot1 = tot1 * a;
    tot2 = tot2 * b;
    cout << tot1 - tot2 << endl;
  }
}
