Happy Number Question - 'Submit' and 'Runcode' give different results

Hi, I am a beginner leetcoder and I got Happy Number question for Day 2 of 30-Day LeetCoding Challenge
When I submit my solution, it says it fails the when the input is 10, but when I run my code with that test case, it gets the correct answer. I tried multiple times with the same test case and different test case. They all work as expected, but the submission is giving me an issue. I have attached screenshot for your review. Can you please tell me what the problem is? Thanks!
image

Comments (0)