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