ShareMyScreen/ProjectEuler/0016

From J Wiki
Jump to navigation Jump to search

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

NB. sum them
NB. │    convert atoms to numbers
NB. │    │      convert to string
NB. │    │      │  extend precision
NB. │    │      │  │  the number
NB. │___ │___   │_ │_ │____
   ([:+/ "."0 @ ": x:)2^1e3