holes in the text ..why it is showing wrong answer??

eclipse
is
it
on
output
ran
samei

#1

import java.util.*;
class MAIN {
public static void main(String[] args) {

Scanner obj=new Scanner(System.in);
int k=obj.nextInt();

String m[]=new String[k];
int m2[]=new int[k];

int z=0;
for(int i=0;i<=k-1;i++)
m*=obj.next();

for(int i=0;i<=k-1;i++)
{
z=0;
for(int j=0;j<=m*.length()-1;j++)
{
if(m*.charAt(j)==‘A’ || m*.charAt(j)==‘D’ || m*.charAt(j)==‘O’ || m*.charAt(j)==‘P’|| m*.charAt(j)==‘R’)
{
++z;
m2*=z;
}

if(m*.charAt(j)=='B')
{
z=z+2;
	m2*=z;
}

}
}

for(int i=0;i<=k-1;i++)
System.out.println(m2*);

}

}


#2

‘Q’ also has one hole!


#3

Please accept the answer once you got what you have got what you needed!!

Happy Coding


#4

thanx pranjalranjan… :slight_smile: