You are viewing a single comment's thread. Return to all comments →
static int solve(int a, int b, long t) {
if(t == 1)return (int) ((a + b) / 2); return (int)pow((a+b)/2,t); } static long pow(long avg, long t) { long x = 1, n = avg; while(t > 0) { if(t%2 == 1) { x=(x * n)%1000000007; } n = (n * n)%1000000007; t /= 2; } return x; }
Seems like cookies are disabled on this browser, please enable them to open this website
Extremely Dangerous Virus
You are viewing a single comment's thread. Return to all comments →
static int solve(int a, int b, long t) {