https://www.codechef.com/viewsolution/10899911
This is the link for some one’s code which got AC verdict…
and this is my code https://www.codechef.com/viewsolution/10899101 which got WA verdict…
but for n = 999 999 894
there will be two numbers which could satisfy the equation..
They are 1) x = 999 999 814 , S(X) = 67, S(S(X)) = 13
2) x = 999 999 799 , S(X) = 79, S(S(X)) = 16
i.e. My code is giving count as 2 for this case…
But when i executed the same on the accepted solution, it is giving count as 0
Which is blunder…
Kindly check this case on your codes… and comment your answers…