-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMax.java
32 lines (27 loc) · 871 Bytes
/
Max.java
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
// Max
import java.util.*;
import java.io.*;
public class Max {
static Scanner sc;
static void solve() {
String[] letters = new String[]{"Alpha", "Bravo", "Charlie",
"Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet",
"Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec",
"Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey",
"Xray", "Yankee", "Zulu"
};
String[] nums = new String[]{"Zero", "Wun", "Too", "Tree", "Fower",
"Fife", "Six", "Seven", "Ait", "Niner"
};
char[] c = sc.next().toCharArray();
for (char ch : c) {
if (ch <= '9') System.out.print(nums[ch - '0'] + " ");
else S3ystem.out.print(letters[ch - 'A'] + " ");
}
System.out.println();
}
public static void main(String[] args) throws FileNotFoundException {
sc = new Scanner(new File("max.dat"));
while(sc.hasNext()) solve();
}
}