#include #include #include #include #include using namespace std; int main() { long long t, tt; int a, b, c; long res; cin >> a >> b >> t; c = (a+b)/2; res = 1; tt = t % 1000000006; long usin[50], k; int j=0; k=1; usin[0] = c; while (2*k <= tt){ k *= 2; j ++; usin[j] = usin[j-1]*usin[j-1]; usin[j] = usin[j] % 1000000007; } res = 1; j = 0; while(tt>0){ if (tt % 2 == 0) tt = tt/2; else{ tt --; tt = tt/2; res *= usin[j]; res = res % 1000000007; } j ++; } cout << res; /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }