/*I have submitted almost 20 times , still I’m not getting , I’m little confident that my answer is //correct but I don’t know on which test case my solution is wrong , please help me, please ,I’m /*new here

```
#include <iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
int t,i,count,counter;
double curr_percent,len;
string a;
cin>>len;
cin>>a;
i=0;
count=0;
counter=0;
while(i < a.length())
{
if (a[i]=='P')
{count++;}
i++;
}
curr_percent=(double)count/len;
if(curr_percent>=0.75)
cout<<"0"<<endl;
else
{
i=2;
while(i< a.length())
{
if(a[i]=='A')
{
if((a[i-1]=='P'||a[i-2]=='P') && (a[i+1]=='P'||a[i+2]=='P'))
{
counter++;
count=count+1;
curr_percent=(double)count/len;
if(curr_percent>=0.75)
break;
}
}
i++;
}
if (counter>0 && curr_percent>=0.75)
cout<<counter<<endl;
else
cout<<"-1"<<endl;
}
}
return 0;
}
```