#include #include #include #include #include #include using namespace std; //int power(int, long long int); int powerMod(unsigned long long int, unsigned long long int, unsigned long long int); int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ unsigned long long int a, b; unsigned long long int t; cin>>a>>b>>t; int fraction = (a+b)/2; unsigned long long int expectedCells = powerMod(fraction,t,1000000007); cout< 0) { // If y is odd, multiply x with result if (y & 1) res = (res*x) % p; // y must be even now y = y>>1; // y = y/2 x = (x*x) % p; } return res; }