2 test cases are generating error
I think these are the possible errors.
- Write your own pow function, for calculating something like 10^18, it will give overflow. So better to use string to take input and work on it.
- If the input is 9xxx, you cannot change the first 9 because it is mentioned that the decimal representation of new number shouldn’t start with 0.
For example if input is 9999, then output should be 9000. Or if the input is 9000, then output remains 9000
Can you give a highlight how to use string in this question as it will be helpful
Just take in input as string, then just operate on it as an array. You want me to share the code?
You can also solve it in this manner https://ide.codingblocks.com/s/430941
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen