#include <stdio.h>
#include <string.h>
int main()
{
int hole=0;
int i;
char word[100];
scanf("%s",&word);
fflush(stdin);
i=strlen(word);
for(i=0;i<=40;i++)
{
if(word[i]=='A' || word[i]=='D' || word[i]=='O' || word[i]=='P' || word[i]=='R' || word[i]=='Q' )
{
hole++;
}
if(word[i]=='B')
{
hole+=2;
}
if(word[i]>=0 && word[i]<=9)
{
break;
}
}
printf("%d",hole);
getchar();
return 0;
}
↧
holes in the text wrong answer
↧