fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. try{
  13. Scanner input = new Scanner(System.in);
  14. int amount = input.nextInt();
  15. input.nextLine();
  16. for(int i = 0 ; i < amount ; i++){
  17.  
  18. int sum = 0;
  19. String nowa = input.nextLine();
  20.  
  21. for(int j = 0; j < nowa.length() ; j++){
  22. char x = nowa.charAt(j);
  23.  
  24. if(x == 'a' || x == 'o' || x == 'u' || x == 'i' || x == 'e' || x == 'y'){
  25. ++sum;
  26. }
  27.  
  28. }System.out.println(sum+ " ");
  29. }
  30. }catch(Exception e){
  31. System.out.println(e);
  32. }
  33. }
  34. }
Success #stdin #stdout 0.14s 321088KB
stdin
4
abracadabra
pear tree
o a kak ushakov lil vo kashu kakao
my pyx
stdout
5 
4 
13 
2