Https://ide.codingblocks.com/s/131733

Wrong ans for 1 test case.
please find the mistake.