Ultra Fast Mathematics Problem

Pls edit the code as it is not working

@sulbh579 Your code is giving runtime error.
See that input format is like this
1
10111 10000
But you are taking input each digit seperately and storing it in an array. This is not the correct way as the compiler will not understand it correctly. It will consider 10111 as one complete digit. Then 10000. Remember that one complete input is seperated from another input by a space.
So take input as a string and then proceed. Follow this code: