I am trying to do pow(2,500) in C++. But I think long long is not enough.

Someone told me I can use gmp.h. But how do I do a pow(2,500) in gmp?

有帮助吗?

解决方案

See Integer Exponentiation. Hint: choose either of the bottom two functions.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top