运行 ID: 127598

Main.cc: In function ‘int main()’:
Main.cc:8:31: error: invalid operands of types ‘__gnu_cxx::__promote_2::__type {aka double}’ and ‘int’ to binary ‘operator%’
   cout << (pow(2, n - 1) + 1) % n;
           ~~~~~~~~~~~~~~~~~~~~^~~