#include<iostream>
#include<string.h>
using namespace std;
int main()
{
int i,test,length; int count =0;
char a[100];
cin>>test;
while(test--)
{
cin>>a;
length=strlen(a);
for(i=0;i<length;i++)
{
if(a[i]=='A'||a[i]=='D'||a[i]=='O'||a[i]=='P'||a[i]=='Q'||a[i]=='R')
{
++count;
}
if (a[i]== 'B')
{
count= count + 2;
}
}
}
cout<<count ;
}
↧
Problem: Holes ; Below is the code I am trying to execute but the compiler keeps giving me a WA . Could anyone help me find whats wrong ?
↧