#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin>>s;
int n = 0;
for(auto c : s)
n+=c=='?';
if(s[0] == '?')
{
cout<<1<<'\n';
return 0;
}
int nb = n;
if(s[1] == 'a')
{
for(char i : s)
{
if(i == 'i')
break;
if(i == 'a')
nb--;
}
}
else
{
for(char i : s)
{
if(i == 'a')
break;
if(i == 'i')
nb--;
}
}
cout<<nb<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
128 ms |
14244 KB |
Output is correct |
2 |
Correct |
100 ms |
14280 KB |
Output is correct |
3 |
Correct |
99 ms |
14256 KB |
Output is correct |
4 |
Correct |
93 ms |
14108 KB |
Output is correct |
5 |
Correct |
101 ms |
14084 KB |
Output is correct |
6 |
Correct |
91 ms |
14008 KB |
Output is correct |
7 |
Correct |
102 ms |
14756 KB |
Output is correct |
8 |
Correct |
105 ms |
14204 KB |
Output is correct |
9 |
Correct |
87 ms |
14556 KB |
Output is correct |
10 |
Correct |
90 ms |
14520 KB |
Output is correct |
11 |
Correct |
113 ms |
14096 KB |
Output is correct |
12 |
Correct |
90 ms |
14772 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |