0_0_17845193_20836.cpp: In function 'int main()':
0_0_17845193_20836.cpp:83:69: error: invalid operands of types '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' and 'const int' to binary 'operator%'
long long temp=sd*(pow(x,i)*((pow(x,j-i+1)-1)*inv[x-1])%mod-(j-i+1))%mod;
^
|