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