Test Cases Failed

I Don’t Know Why I Test For All Test Cases Then Also Its Showing Failed Test Cases .

import java.util.*;

public class Main {
public static void main(String args[]) {

	System.out.println(replace("3"));
	System.out.println(replace("xpix"));
	System.out.println(replace("xabpixx3.15x"));
	System.out.println(replace("xpipippixx"));
	System.out.println(replace("-678xpipippixx"));
	

	

}public static String replace(String str){
	if(str.length()<=1){
		return str;
	}
	if(str.charAt(0)=='p' && str.charAt(1)=='i' && str.length()>=2){
		return "3.14"+replace(str.substring(2));
	}
	return str.charAt(0)+replace(str.substring(1,str.length()));
}

}

take input in your code according to Input Format

Integer N, no of lines with one string per line
and the call your function

Not Getting Properly

int t=in.nextInt();
for(int i=0;i<t;i++){
      int l=in.nextInt();
      int arr[]=new int[l];
      for(int k=0;k<l;k++){
            arr[k]=in.nextInt();
      }
      System.out.println(replace(arr) );
}

Use this