Program wouldnt work on codechef

I am having an issue that my code doesnt run on the codechef IDE but it works on my IntlliJ IDEA.Can somebody please help me out.

Please provide problem link, solution link and ideone link.

If you’re talking about this, then you need to make sure you don’t output anything except what is required.

For e.g - System.out.println("Enter the no. of text cases : ");
This line would mess up the output, you’re giving out. You just need to take input without any prompt and give the output in required format.