Can someone please point out why I am getting wrong answer for the code?
@Aniruddha use long long instead of int.