You are viewing a single comment's thread. Return to all comments →
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)
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Project Euler #16: Power digit sum
You are viewing a single comment's thread. Return to all comments →
100% python