ans is coming right but testcases not passing
Error in program
Modified Code
mistakes
- Print end after each testcase
- int z=0 should comes inside while loop
look at modified code it is passing all testcase now
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask