Code Related issue

Hi team,
In over happy numbers I have written the below code it’s not passing two test cases. please suggest what change can I make in it to pass all the test cases

https://ide.geeksforgeeks.org/UzZEie1ZTc

@rajatchaturvedi1995
Actually the issue is given input is not simple a int, it’s a string of digit like ( 999999999999999999999999999999999999) which can’t be stored in int. Stored 1st input in string then save it’s next result in Long and proceed in the same way you did it.

can you provide the code with the updated changes.

@rajatchaturvedi1995


here is the updated code. plz check

Thanks
Abhishek Sharma