#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, n, t;
  long long int s1 = 0, s2 = 0;
  cin >> a >> b >> n;
  t = n / 2;
  for (int i = 0; i < t; i++) s1 = s1 + b;
  for (int i = 0; i < n - t; i++) s2 = s2 + a;
  cout << s2 - s1 << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  short t;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
