Problem 45250. Be happy

check whether the given number is happy in b-base.

  • A happy number can be defined as a number which will yield 1 when it is replaced by the sum of the square of its digits repeatedly. If this process results in an endless cycle of numbers containing 4, then the number is called an unhappy number.

This is the case for base-10. For other bases, different scenerios would occur.

Solution Stats

48.0% Correct | 52.0% Incorrect
Last Solution submitted on Apr 03, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers29

Suggested Problems

More from this Author165

Problem Tags

Community Treasure Hunt

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

Start Hunting!