What is the sum of the digits of the number 2^1000?

前端 未结 10 1838
别跟我提以往
别跟我提以往 2021-01-02 03:13

This is a problem from Project Euler, and this question includes some source code, so consider this your spoiler alert, in case you are interested in solving it yourself. It

10条回答
  •  生来不讨喜
    2021-01-02 03:46

    Try using BigInteger type , 2^100 will end up to a a very large number for even double to handle.

提交回复
热议问题