大佬们帮我看看,为什么本地编译器能通过,题中案例就通不过呢

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"); 
       }
    }  
}

#学习路径#
全部评论
点赞 回复
分享
发布于 2020-08-07 20:14

相关推荐

头像
不愿透露姓名的神秘牛友
03-13 14:57
点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务