I am getting correct output in the compiler but test cases are failing.
Failed test cases
1
4
630 6300 63000 630000
your code will fail in this case, it returns 630000630006300630
while correct is 630630063000630000
this is just one straight off my head, it will fail in so many other cases as well, where the one is subset of another
the correct logic is to input the numbers and compare them as strings
this is my submission, u can refer to this
I copied your entire code and it is still not working. Showing run time error
that was to refer, not copy, it was just a logic, it did not have any header files, this one will run
ok, so i saw it again, the inputs have been changed
1<=A[i]<=10^5
according to this constraint stoi should work, which is used in my code
but inputs are actually out of this range
this will work