For this problem, I submitted a code1 and it gave Runtime error. Here I have used long long int as the data type for all suitable variables using a 'typedef long long int ll' declaration at top
Now I just changed all the data types to 'int' by changing it to 'typedef int ll' and everything worked fine code2
In some other submission I changed the string declaration to char and again everything worked fine code3
I am not really able to understand the failure of code1. Please help me out !!!
-------------------------------------------------------------- For this problem my friend too faced the same issue.
Failed code Passed code — just changed long long int to int