Problem 20. Summing digits

Given n, find the sum of the digits that make up 2^n.

Example:

 Input  n = 7
 Output b = 11

since 2^7 = 128, and 1 + 2 + 8 = 11..

Solution Stats

53.69% Correct | 46.31% Incorrect
Last Solution submitted on Dec 02, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers7659

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!