0016.py 325 B

12345678910111213
  1. # 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
  2. # What is the sum of the digits of the number 2^1000?
  3. def solution() -> int:
  4. return sum(map(lambda x: int(x), str(2**1000)))
  5. def main() -> bool:
  6. res = solution()
  7. print(f"Solution: {res}")
  8. return True
  9. if __name__ == "__main__":
  10. main()