Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 1.58 KB

File metadata and controls

76 lines (60 loc) · 1.58 KB

//{ Driver Code Starts //Initial Template for Java

import java.util.; import java.lang.; import java.io.*; class GFG {

public static void main (String[] args)
{
    //taking input using class Scanner
	 Scanner sc = new Scanner(System.in);
	 
	 //taking total count of all testcases
	 int t = sc.nextInt();
	 sc.nextLine();
	 boolean flag = false;
	 while(t-- > 0){
	  
	  //taking the input String
	  String s=sc.nextLine();
	  
	  //Creating an object of class Geeks
	  Geeks obj=new Geeks();
	  
	  //calling the checkString
	  //method of class Geeks
	  obj.checkString(s);
	   
	 }
}

} // } Driver Code Ends

//User function Template for Java

class Geeks{

static void checkString(String s)
{
    int v=0;
    int c=0;
    char arr[]=new char[s.length()];
    for(int i =0; i<s.length();i++){
        arr[i] = s.charAt(i);
    }
    for(int i = 0; i<s.length() ;i++){
        if(arr[i]=='a'||arr[i]=='e'||arr[i]=='i'||arr[i]=='o'||arr[i]=='u'||arr[i]=='A'||arr[i]=='E'||arr[i]=='I'||arr[i]=='O'||
        arr[i]=='U'){
            v++;
        }
        else if(arr[i]==' '){
            continue;
        }
        else{
            c++;
        }
    }
    //Your code here
    
    if(v>c)
    System.out.print("Yes");
    else if(c>v)
    System.out.print("No");
    else
   System.out.print("Same");
    
    System.out.println();
}

}

//Position this line where user code will be pasted.