link for code CodeChef: Practical coding for everyone
didn’t getting his approach , someone pls explain the logic
help @soham1234