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
Problem Comments
6 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers7857
Suggested Problems
-
Project Euler: Problem 1, Multiples of 3 and 5
3665 Solvers
-
Output any real number that is neither positive nor negative
408 Solvers
-
Fahrenheit to Celsius converter
599 Solvers
-
Natural numbers in string form
1851 Solvers
-
Find my daddy long leg (No 's')
2717 Solvers
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!
The test suite was broken, as many of you suspected. I fixed it and rescored the problems.
I like this problem:)
very interesting problem
Good
The test case 3 is totally wrong. It needs immediate correction. The code maker didn't notice that b=25 is a number not a single digit. If you're doing the sum of digits it always ends up with a single digit, it will never end up with number cause number itself is carrying multiple digits.
Just for the badge ; )