fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int pro=0;
  7. int ans=0;
  8. char a[100];
  9. cin>>a;
  10. cout<<a<<endl;
  11. for(int i=0;i<100;i++)
  12. {
  13. if(a[i]=='F')
  14. {
  15. pro=pro+1;
  16. if(pro>ans)
  17. {
  18. ans=pro;
  19. }
  20. }
  21. else
  22. {
  23. pro=0;
  24. }
  25. }
  26. cout<<ans;
  27. return 0;
  28. }
Success #stdin #stdout 0s 4460KB
stdin
FfffFFFFffFFfff
stdout
FfffFFFFffFFfff
4