import java.io.;
import java.util.;
import java.math.*;
class Test
{
public static void main(String args[])throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int N, T,i,j,k=0;
int ck=0,s=0,e=0,em=0,m=0,mh=0,h=0;
String[] con= {“cakewalk”,“simple”,“easy”,“easy-medium”,“medium”,“medium-hard”,“hard”};
String[] result=new String[10];
T=Integer.parseInt(br.readLine());
Random rn=new Random();
for(i=1;i<=T;i++)
{
N=Integer.parseInt(br.readLine());
for(j=1;j<=N;j++)
{
int index = rn.nextInt(con.length);
String con1=con[index];
System.out.println(con[index]);
if (con1 == "cakewalk")
{
++ck;
}
else if(con1 == "simple")
{
++s;
}
else if(con1=="easy")
{
++e;
}
else if(con1=="easy-medium")
{
++em;
}
else if(con1=="medium")
{
++m;
}
else if(con1=="medium-hard")
{
++mh;
}
else if(con1=="hard")
{
++h;
}
//System.out.println(ck+""+s+""+e+""+em+""+m+""+mh+""+h);
}
if((ck!=0&& s!=0 && e!=0 && em!=0 && m!=0 && mh!=0 && h!=0)||(ck!=0 && s!=0 && e!=0 && em!=0 && mh!=0 && h!=0)||(ck!=0 && s!=0 && e!=0 && m!=0 && mh!=0 && h!=0)||(ck!=0 && s!=0 && e!=0 && em!=0 && m!=0 && h!=0)||(ck!=0 && s!=0 && e!=0 && em!=0 && m!=0 && mh!=0))
{
result[k]="Yes";
k++;
}
else
{
result[k]="No";
k++;
}
for(i=0;i<result.length;i++)
{
System.out.println(result[i]);
}
}
}
}
Output:-
1
7
easy-medium
easy-medium
hard
simple
easy-medium
medium-hard
hard
No
null
null
null
null
null
null
null
null
null
Want to know why is null coming in the code???