我不明白,为什么在本地IDEA上运行第三个测试点的数据,结果是正确的,但在洛谷上还是显示错误RE
import java.util.*;
public class Main {
public static void main(String [] args){
Scanner c= new Scanner(System.in);
int n = c.nextInt(); // n种操作
String blank = c.nextLine(), s = c.nextLine();
String str = s;
while(n--!=0){
int aa =c.nextInt();
if(aa == 1){
str = s.concat(c.nextLine().trim());
System.out.println(str);
}
else if(aa == 2){
int a = c.nextInt(), b = c.nextInt();
str = str.substring(a, a+b);
System.out.println(str);
blank = c.nextLine();
}
else if(aa == 3){
int a = c.nextInt();
String cc = c.nextLine().trim();
str = str.substring(0, a) + cc + str.substring(a);
System.out.println(str);
}
else if(aa == 4){
System.out.println(str.indexOf(c.nextLine().trim()));
}
}
}
}