Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <cmath>
- #include <vector>
- #include <algorithm>
- #include <cstdio>
- #include <math.h>
- #include <string>
- #include <stdio.h>
- #include <string.h>
- #include <string>
- #include <stdlib.h>
- #include <cmath>
- #include <iomanip>
- #include <queue>
- #include <utility>
- #include <vector>
- #include <stack>
- #include <list>
- #include <iterator>
- #include <cctype>
- #include <exception>
- #include <cstdlib>
- #include <stdexcept>
- #include <csignal>
- #include <pthread.h>
- using namespace std;
- int main(int argc, const char * argv[]) {
- string number;
- int countZero=0;
- int maxZero=0;
- cin>>number;
- for(int i=0; i<number.length();i++){
- if (number[i] == '0'){
- countZero++;
- }
- if (countZero>maxZero){
- maxZero=countZero;
- }
- if (number[i]=='1'){
- countZero=0;
- }
- }
- cout<<maxZero<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement