mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:31:59 +00:00
CF1146A Love "A"
R40362120
This commit is contained in:
parent
07eb0d6a28
commit
1dd1d5a132
16
problem/CF1146A/CF1146A.cpp
Normal file
16
problem/CF1146A/CF1146A.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
char c;
|
||||
int n = 0, a = 0;
|
||||
while (cin >> c) {
|
||||
n++;
|
||||
if (c == 'a') {
|
||||
a++;
|
||||
}
|
||||
}
|
||||
cout << min(a * 2 - 1, n) << endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user