Getting Presentation error please help!!!

link text

aLL my test cases are being passed but i am getting presentation error


    import FastIO.InputReader;
    import FastIO.OutputWriter;
    
    import java.io.IOException;
    
    public class StringPermute {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
    
                    String toCheck = in.readLine();
                    Permute permute = new Permute();
                    permute.permute(toCheck,0 , toCheck.length()-1);
        }
    }
    
     class Permute {
           void permute(String str, int l, int r) {
            if(l == r) {
                System.out.println(str);
            }
            else {
                for (int i=l; i<=r; i++) {
                    str = swap(str,l,i);
                    permute(str ,l+1 ,r);
                    str = swap(str,l,i);
                }
            }
        }
    
        private String swap(String temp , int l , int i) {
    
            char[] charArray = temp.toCharArray();
            char a = charArray[l];
            charArray[l] = charArray[i];
            charArray[i] = a;
            return  String.valueOf(charArray);
        }
    }

I think problem is at Sopln() line but I am unable to remove it.

Are you kidding…? Presentation Error on codechef…as far as i know there is no such verdict as Presentation Error.I checked your profile to verify it what you got is runtime error(NZEC)…reason could be class name change it to Main and test it…

1 Like

Even i was a LOT puzzled that since when did JAVA start getting presentation error here. The judge is tolerant to some extra spaces etc.

1 Like