Few test cases failing
you are reusing the variable n
corrected code
Ohh yes!! 
But we can do like this too?one test case is still failing.please see to it sir.
use long long instead of int.
you are reusing the variable n
corrected code
Ohh yes!! 
But we can do like this too?one test case is still failing.please see to it sir.
use long long instead of int.