Daily challenge for 2025-05-02
122. Happy Number
Write a function solve that determines if a number is a happy number (eventually reaches 1 when replaced by the sum of the square of each digit).
Example:Input: 19Output: true
Explanation: 1^2 + 9^2 = 82 -> 8^2 + 2^2 = 68 -> 6^2 + 8^2 = 100 -> 1^2 + 0^2 + 0^2 = 1.
Run this challenge interactively in Python or JavaScript when the app loads.