For this program since the constraints are big , i assigned the variables to long long int , but when executing the program , the output is a very large random number.
But when i change the variables to int , the output is correct.
why is this so ? thanks