Click here to read the complete problem statement.
This problem has a problem. It is not taking the correct ans