Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include<iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. string s1;
  7. cin>>s1;
  8. int condition = 1;
  9. for(int i=1; i<=s1.length(); i++){
  10. if(s1[i] == s1[i-1]){
  11. condition++;
  12. if(condition==7){
  13. cout<<"YES"<<endl;
  14. return 0;
  15. }
  16. }else{
  17. condition=1;
  18. }
  19.  
  20. }
  21. cout<<"NO"<<endl;
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement