真的很大

1 c++ biginteger

首先道歉,如果已经有这样的话题,但我还没有找到......我需要知道如何处理一个非常大的数字,如789 ^ 2346的结果:

#include <iostream>
#include <cmath>
using namespace std;
int main () {
    cout << pow(789,2346) << endl;
}
Run Code Online (Sandbox Code Playgroud)

Bru*_*eis 6

您可以尝试GNU MP Bignum Libraryttmath.这个链接指向一些样本.这是非常容易使用.