简介

c = c++ ?
c = ++c ?

code

#include <iostream>
#include <string>
using namespace std;
int main() {
    long long n;
    while(cin >> n) {
        bool pre = true;
        int c = 0;
        int t = 128;
        int maxC = 0;
        while(t--){
            c = n & 1 ? ++c : 0;
            if(c > maxC) {
                maxC = c;
            }
            n = n >> 1;
        }
        cout << maxC << endl;
    }
}
posted on 2021-06-28 09:50  HDU李少帅  阅读(43)  评论(0编辑  收藏  举报