Form Biggest Number

The coding blocks compiler is not working.
When I compile the code on my compiler, it is working fine. But when I compile it on hacker blocks, it shows the wrong answer.

file:///C:/Users/Ansh%20Goel/OneDrive/Pictures/Screenshots/Screenshot%20(229).png

hello @anshgoel_02

pls save ur code at cb ide and share its link with me

ur approach is correct, but it will give wrong answer because of overflow.

because a single long variable can hold atmax 18 digits.

but in input number of digits can exceed long long . so dont combine into single number.
it will be better to take input as string in place of int
check this