import java.util.*;
public class Football {
public static void main(String[]args){
Scanner inScanner=new Scanner(System.in);
String s=inScanner.next();
if(s.contains("0000000")||s.contains("1111111"))
System.out.println("YES");
else
System.out.println("NO");
}
}
改进:单独的if与else运算可以采用三目运算符进行
CodeForces-96A-Football
最新推荐文章于 2022-05-04 15:08:44 发布