In Project Euler Problem #16, we are asked for sum of the digits of powers of 2. Here we will be asked for more than that.
Given an integer power n, create a function the outputs
, where:
- a is the first 5 digits of
,
- b is the last 5 digits of
,
- c is the number of digits of
, and
- d is the sum of the digits of
.
For example, for
since
, therefore
. If
, please output
, therefore for
,
.
As an added challenge, some functions are disabled.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
-
The Goldbach Conjecture, Part 2
2417 Solvers
-
10790 Solvers
-
Back to basics 8 - Matrix Diagonals
971 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
104 Solvers
-
Generate a string like abbcccddddeeeee
276 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!