I am gettting correct output on other IDE and online IDE of coding block, but getting wrong output on submission form IDE.
What is wrong in this code?
hi @itismohiton this doesn’t account for cases like
90 9000 where expected answer is 909000 but this code will give answer as 900990
What changes should i do in this code?
@itismohiton you can do a comparison of (a+b) and (b+a) instead of a and b directly. (+ refers to concatenation of strings in C++)
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
the doubt.