Project Euler #16: Power digit sum

  • + 1 comment

    100% python

    for _ in range(int(input())):
        n = int(input())
        sn = str(2**n)
        ans = 0
        for d in sn:
            ans += int(d)
        print(ans)