0_0_17862495_12518.cpp: In function 'int main()':
0_0_17862495_12518.cpp:66:52: error: invalid operands of types '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' and 'const int' to binary 'operator%'
ans = ((ll)ans + ((pow(x, last+1) - pow(x, i))%mod * tp) % mod * phi[n/i]);
^
|