#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, a, b, c, i, p = 0, ans = 0, q = 0, r = 0, s = 0;
  cin >> t;
  while (t--) {
    cin >> a >> b >> c;
    if (c % 2 != 0) {
      p = (c / 2) + 1;
      q = c - p;
      r = p * a;
      s = q * b;
      ans = r - s;
      cout << ans << endl;
    } else {
      c = c / 2;
      cout << (c * a) - (c * b) << endl;
    }
    c = 0;
    ans = 0;
    p = 0;
    q = 0;
    r = 0;
    s = 0;
  }
}
