<分区>
所以,我正在尝试解决 Project Euler 上的第 16 题,来自 http://projecteuler.net如果你还没有看到它。具体如下:
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 2^1000?
我无法弄清楚如何在 C++ 中表示数字 2^1000。我猜这是有诀窍的,但我真的被困住了。我并不是真的想要问题的答案,我只是想知道如何将该数字表示为一个变量,或者如果有什么技巧,也许有人可以告诉我?