- [北辰杯 North-Star-Cup] 三月月赛
题解
- 2023-3-18 8:42:15 @
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin>>s;
int cnt=0;
for(int i=0;i<s.size();i++){
if(s[i]!=i%2+'0')cnt++;
}
cout<<min(cnt,int(s.size())-cnt);
return 0;
}
0 comments
No comments so far...