-
Notifications
You must be signed in to change notification settings - Fork 0
/
ANewAlphabet.java
42 lines (36 loc) · 1.64 KB
/
ANewAlphabet.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
33
34
35
36
37
38
39
40
41
42
// open.kattis.com/problems/anewalphabet
import java.util.*;
import java.io.*;
public class ANewAlphabet {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String line = in.nextLine().toLowerCase().trim();
line = line.replaceAll("a", "@");
line = line.replaceAll("b", "8");
line = line.replaceAll("c", "(");
line = line.replaceAll("d", "|)");
line = line.replaceAll("e", "3");
line = line.replaceAll("f", "#");
line = line.replaceAll("g", "6");
line = line.replaceAll("h", "[-]");
line = line.replaceAll("i", "|");
line = line.replaceAll("j", "_|");
line = line.replaceAll("k", "|<");
line = line.replaceAll("l", "1");
line = line.replaceAll("m", "[]\\\\/[]");
line = line.replaceAll("n", "[]\\\\[]");
line = line.replaceAll("o", "0");
line = line.replaceAll("p", "|D");
line = line.replaceAll("q", "(,)");
line = line.replaceAll("r", "|Z");
line = line.replaceAll("s", "\\$");
line = line.replaceAll("t", "\'][\'");
line = line.replaceAll("u", "|_|");
line = line.replaceAll("v", "\\\\/");
line = line.replaceAll("w", "\\\\/\\\\/");
line = line.replaceAll("x", "}{");
line = line.replaceAll("y", "`/");
line = line.replaceAll("z", "2");
System.out.println(line);
}
}