fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string s;
  6. cin>>s;
  7. int count=0;
  8. for(int i=0;i<s.length();i++)
  9. {
  10. if(s[i]==s[i+1])
  11. {
  12. count++;
  13. }
  14. if(s[i]!=s[i+1])
  15. {
  16. count=0;
  17. }
  18. }
  19. if(count>0)
  20. {
  21. cout<<"True";
  22. }
  23.  
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5516KB
stdin
( )
stdout
Standard output is empty