-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path10897.java
More file actions
53 lines (44 loc) · 1.28 KB
/
10897.java
File metadata and controls
53 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package algo;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
public class Main {
private static String str = null;
private static int ans = 0;
public static void main(String[] args) throws IOException {
InputClass.input();
new Solution().run();
InputClass.close();
}
static class Solution {
public void run() throws IOException {
str.chars()
.forEach(i -> {
char c = (char) i;
if(c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
ans++;
}
});
InputClass.BW.write(ans+"\n");
}
}
static class InputClass {
public static final BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));
public static final BufferedWriter BW = new BufferedWriter(new OutputStreamWriter(System.out));
private static StringTokenizer st = null;
public static void input() throws IOException {
st = getStringTokenizer();
str = st.nextToken();
}
public static void close() throws IOException {
BR.close();
BW.close();
}
public static StringTokenizer getStringTokenizer() throws IOException {
return new StringTokenizer(InputClass.BR.readLine(), " ");
}
}
}