大佬们帮我看看,为什么本地编译器能通过,题中案例就通不过呢
public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.nextLine(); String[] a = str.split("\\."); int[]b= new int[4]; for(int i=0;i<4;i++){ b[i]= Integer.parseInt(a[i]); } if(b[0]>255 ||b[1]>255 || b[2]>255 || b[3]>255 ){ System.out.println("NO"); }else{ System.out.println("YES"); } } }
#学习路径#