Write a function to determine if a number is a happy number (A happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit).
HardProblem Statement
Write a function to determine if a number is a happy number (A happy number is a number which eventually reaches 1 when replaced by the sum of the square of each digit).
Sample Input
19
Sample Output
True
Limits
Time: 2s · Memory: 256 MB