My issue
My code
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner input = new Scanner(System.in);
int t = input.nextInt();
input.nextLine(); // Consume the newline character after reading the integer
for (int i = 1; i <= t; i++) {
int size = input.nextInt();
input.nextLine(); // Consume the newline character after reading the integer
String word = input.nextLine();
word = word.toLowerCase();
String result = "";
int count=0;
for(int j=word.length()-1; j>=0; j--) {
if(word.charAt(j) !='a' && word.charAt(j) !='e' && word.charAt(j) !='i' && word.charAt(j) !='o' && word.charAt(j)!='u') {
count++;
}
}
if(count>=4) {
System.out.println("NO");
}
else {
System.out.println("YES");
}
}
}
}
Problem Link: EZSPEAK Problem - CodeChef