The code works well for 1st test case but showing wrong answer for other 2 test cases
Hi @tanjuljain19, just take long instead of int . check this code