Skip to content

Commit

Permalink
Create main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaherBG authored Mar 9, 2020
1 parent 24683d8 commit aea9e2c
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import java.util.Scanner;

public class Football {
public static void main(String[] args) {
String m;
int c=0;
Scanner s = new Scanner(System.in);
m= s.next();
for(int i=1;i<m.length();i++){
if(m.charAt(i-1)==m.charAt(i)){
c++;
if(c>=6)
break;
}
else
c=0;
}
if(c>=6)
System.out.println("YES");
else
System.out.println("NO");
}
}

0 comments on commit aea9e2c

Please sign in to comment.