返回顶部

projecteuler 16.Power digit sum

打了个表看了看,好像没什么算法能搞出来啊
直接python吧(

num = 2 ** 1000

res = 0

while num != 0:
    res = res + num % 10
    num //= 10

print(res)
posted @ 2022-04-21 00:29  Rayotaku  阅读(54)  评论(0编辑  收藏  举报